components:
    examples: {}
    headers: {}
    parameters:
        refId:
            name: ref
            in: query
            description: 'Referral Partner Id to add to offer urls. Unique per partner, and is used to attribute traffic.'
            schema:
                type: string
        market:
            name: market
            in: query
            schema:
                type: string
                enum:
                    - se
                    - no
                    - dk
                    - fi
                    - fr
                    - gb
                    - nz
            required: true
            description: 'Two-letter country code for the market to perform search in.'
        product:
            in: query
            name: product
            schema:
                type: string
            description: 'Product name to find suggestions for, limited to eight space separated terms.'
            examples:
                'mobile phone':
                    value: 'Samsung A51'
                'vacuum cleaner':
                    value: iRoomba
        category:
            in: query
            name: category
            deprecated: true
            description: 'Use filter[category] instead.'
            schema:
                type: string
        q:
            in: query
            name: q
            required: true
            schema:
                type: string
            description: 'Query to find category suggestions for.'
            examples:
                'mobile phones':
                    value: mobile-phones
                tablets:
                    value: tablets
        limit:
            in: query
            name: limit
            schema:
                type: number
            description: 'The max number of results to receive. (Default 5, Up to 30)'
        prodLimit:
            in: query
            name: limit
            schema:
                type: number
            description: 'The max number products to receive. (Default 10, Up to 15)'
        offset:
            in: query
            name: offset
            schema:
                type: number
            description: 'The amount to offset the results by.'
        filterCategory:
            name: 'filter[category]'
            in: query
            description: 'Filter products based on Prisjakt category slug. This can be fetched in the /categories endpoint.'
            schema:
                type: string
        filterPriceTrend:
            name: 'filter[price_trend]'
            in: query
            description: 'Filter based on price trend percentage greater or equal to the given number.  See [this section](https://developer.prisjakt.nu/docs/sections/for-partners/integrations/partner-search/#cookbook-prisjakt-daily-deals) for details about price trend'
            schema:
                type: number
        filterMinPriceTrend:
            name: 'filter[price_trend][gte]'
            in: query
            description: 'Filter based on price trend percentage greater or equal to the given number.  See [this section](https://developer.prisjakt.nu/docs/sections/for-partners/integrations/partner-search/#cookbook-prisjakt-daily-deals) for details about price trend'
            schema:
                type: number
        filterMaxPriceTrend:
            name: 'filter[price_trend][lte]'
            in: query
            description: 'Filter based on price trend percentage less than or equal to the given number.  See [this section](https://developer.prisjakt.nu/docs/sections/for-partners/integrations/partner-search/#cookbook-prisjakt-daily-deals) for details about price trend'
            schema:
                type: number
        filterAllCondition:
            name: 'filter[all_conditions]'
            in: query
            description: 'Include refurbished items, in addition to factory-sealed items.'
            schema:
                type: boolean
                default: false
            allowEmptyValue: true
        filterSecondGradeConditionOnly:
            name: 'filter[second_grade_conditions_only]'
            in: query
            description: 'Filter to only include offers where the price is for a second-grade product condition. This is relevant when comparing second-grade vs new products.'
            schema:
                type: boolean
                default: true
            allowEmptyValue: true
        filterSalePriceOnly:
            name: 'filter[sale_price_only]'
            in: query
            description: 'Restricts the response to offers with a discounted sale price. Note: The absolute lowest price may belong to a non-sale offer.'
            schema:
                type: boolean
                default: false
            allowEmptyValue: true
        gtin:
            in: query
            name: gtin
            schema:
                type: string
            description: 'Find products by GTIN up to 10 comma separated IDs.'
    requestBodies: {}
    responses:
        AuthenticationResponse:
            description: 'Suggested products for query.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            access_token:
                                type: string
                            expires_in:
                                type: number
                                description: 'lifetime of the access_token in seconds'
                            token_type:
                                type: string
                    examples:
                        success:
                            value:
                                access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
                                expires_in: 600
                                token_type: Bearer
        SuggestionResponse:
            description: 'Products matching filters and query, and their available offers: Products returned in order of their popularity on Prisjakt.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            data:
                                type: array
                                items:
                                    $ref: '#/components/schemas/Suggestion'
                            links:
                                $ref: '#/components/schemas/Links'
                    examples:
                        success:
                            value:
                                data:
                                    - {productId: '10721661', productName: 'TCL 85P745 85" 4K Ultra HD (3840x2160) Google TV', productPage: 'https://www.prisjakt.nu/produkt.php?p=10721661&ref=<your-partner-id>', category: {id: '107', name: TV, rank: 8}, brand: {name: TCL}, images: {small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/10721661.jpg', medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/10721661.jpg', large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/10721661.jpg'}, lowestPrice: {price: {value: 11990, currency: SEK, includingShipping: null}, memberPrice: null, salesPrice: {value: 11990, currency: SEK, start: null, end: null}, originalPrice: {value: 19990, currency: SEK, start: null, end: null}, url: 'https://www.prisjakt.nu/go-to-shop/54/offer/646529?client_id=1521&partner_id=<your-partner-id>', condition: new, shop: {id: 54, name: Elgiganten, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/4/54.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/4/54.png'}}, priceTrend: {percentage: 29}}}
                                    - {productId: '6002738', productName: 'Philips Premium Airfryer XXL HD9650', productPage: 'https://www.prisjakt.nu/produkt.php?p=6002738&ref=<your-partner-id>', category: {id: '556', name: 'Airfryers & Fritöser', rank: 3}, brand: {name: Philips}, images: {small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/6002738.jpg', medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/6002738.jpg', large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/6002738.jpg'}, lowestPrice: {price: {value: 1990, currency: SEK, includingShipping: null}, memberPrice: null, salesPrice: {value: 1990, currency: SEK, start: null, end: null}, originalPrice: {value: 2990, currency: SEK, start: null, end: null}, url: 'https://www.prisjakt.nu/go-to-shop/54/offer/HD965090?client_id=1521&partner_id=<your-partner-id>', condition: new, shop: {id: 54, name: Elgiganten, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/4/54.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/4/54.png'}}, priceTrend: {percentage: 21}}}
                                    - {productId: '5910701', productName: 'Sony PlayStation DualSense - Cosmic Red (PS5) (Original)', productPage: 'https://www.prisjakt.nu/produkt.php?p=5910701&ref=<your-partner-id>', category: {id: '712', name: Handkontroller, rank: 2}, brand: {name: 'Sony PlayStation'}, images: {small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/5910701.jpg', medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/5910701.jpg', large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/5910701.jpg'}, lowestPrice: {price: {value: 399, currency: SEK, includingShipping: null}, memberPrice: null, salesPrice: null, originalPrice: null, url: 'https://www.prisjakt.nu/go-to-shop/11704/offer/0f55a271-8cba-4092-a800-9ed4e934f81a?client_id=1521&partner_id=<your-partner-id>', condition: new, shop: {id: 11704, name: Fyndiq, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/4/11704.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/4/11704.png'}}, priceTrend: {percentage: 25}}}
                                    - {productId: '5946291', productName: 'Jabra Elite 4 Active True Wireless In-ear', productPage: 'https://www.prisjakt.nu/produkt.php?p=5946291&ref=<your-partner-id>', category: {id: '148', name: Hörlurar, rank: 18}, brand: {name: Jabra}, images: {small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/5946291.jpg', medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/5946291.jpg', large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/5946291.jpg'}, lowestPrice: {price: {value: 689, currency: SEK, includingShipping: null}, memberPrice: null, salesPrice: null, originalPrice: null, url: 'https://www.prisjakt.nu/go-to-shop/177/offer/1225139?client_id=1521&partner_id=<your-partner-id>', condition: new, shop: {id: 177, name: POWER, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/7/177.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/7/177.png'}}, priceTrend: {percentage: 10}}}
                                    - {productId: '11910692', productName: 'Harry Potter Magic Wand Advent Calendar 2023', productPage: 'https://www.prisjakt.nu/produkt.php?p=11910692&ref=<your-partner-id>', category: {id: '1923', name: Adventskalendrar, rank: 4}, brand: {name: 'Harry Potter'}, images: {small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/11910692.jpg', medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/11910692.jpg', large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/11910692.jpg'}, lowestPrice: {price: {value: 309, currency: SEK, includingShipping: null}, memberPrice: {value: 195, currency: SEK, start: null, end: null}, salesPrice: null, originalPrice: null, url: 'https://www.prisjakt.nu/go-to-shop/37855/offer/2134630?client_id=1521&partner_id=<your-partner-id>', condition: new, shop: {id: 37855, name: Buyersclub, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/5/37855.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/5/37855.png'}}, priceTrend: {percentage: 22}}}
                                links:
                                    next: 'https://api.pj.nu/partner-search/suggestions?market=se&ref=<your-partner-id>&filter%5Bprice_trend%5D=10&limit=5&offset=5'
                                    prev: null
        CategoriesResponse:
            description: 'Suggested categories for query.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            data:
                                type: array
                                items:
                                    $ref: '#/components/schemas/Category'
                    examples:
                        success:
                            value:
                                data:
                                    - {id: '103', name: 'Mobile Phones', url: 'https://pricespy.co.uk/c/mobile-phones', logo: 'https://pricespy-75b8.kxcdn.com/g/cat/192/mobil.png', slug: mobile-phones}
                                    - {id: '1989', name: 'Mobile Phone Holders', url: 'https://pricespy.co.uk/c/mobile-phone-holders', logo: 'https://pricespy-75b8.kxcdn.com/g/cat/192/popsockets.png', slug: mobile-phone-holders}
                                    - {id: '1792', name: 'Power Banks', url: 'https://pricespy.co.uk/c/power-banks', logo: 'https://pricespy-75b8.kxcdn.com/g/cat/192/portabel_batteri.png', slug: power-banks}
                                    - {id: '819', name: Backpacks, url: 'https://pricespy.co.uk/c/backpacks', logo: 'https://pricespy-75b8.kxcdn.com/g/cat/192/ryggsack.png', slug: backpacks}
                                    - {id: '1711', name: 'Wireless Chargers', url: 'https://pricespy.co.uk/c/wireless-chargers', logo: 'https://pricespy-75b8.kxcdn.com/g/cat/192/trodlosaladdare.png', slug: wireless-chargers}
        ProductResponse:
            description: 'Product details and offers.'
            content:
                application/json:
                    schema:
                        oneOf:
                            -
                                $ref: '#/components/schemas/Product'
                            -
                                $ref: '#/components/schemas/ProductArray'
                    examples:
                        success:
                            value:
                                productId: '5248850'
                                productName: 'Samsung Galaxy A51 SM-A515F/DS Dual SIM 4GB RAM 128GB'
                                productPage: 'https://www.prisjakt.nu/produkt.php?p=5248850'
                                category:
                                    id: '103'
                                    name: Mobiltelefoner
                                    rank: 317
                                brand:
                                    name: Sasmung
                                images:
                                    small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/5248850.jpg'
                                    medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/5248850.jpg'
                                    large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/5248850.jpg'
                                offers:
                                    - {price: {value: 1500, currency: SEK}, salesPrice: null, memberPrice: null, originalPrice: null, url: 'link to offer', condition: new, shop: {name: PhoneHero, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/1/36041.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/1/36041.png'}}, alternativePrices: [{price: {value: 1500, currency: SEK}, url: 'link to offer'}, {price: {value: 1500, currency: SEK}, url: 'link to offer'}]}
                                properties:
                                    - {type: category, name: Connections, value: null, unit: null, icon: null, properties: [{type: boolean, name: 'Hörlursutgång (2,5/3,5 mm)', value: false, unit: null, icon: null, properties: []}, {type: string, name: Dataanslutning, unit: null, value: USB, icon: null, properties: [{type: string, name: 'Typ av USB-kontakt', unit: null, value: 'USB (Typ C)', icon: null}]}]}
                                coreProperties:
                                    - {type: property, name: 'Pekskärm (touchscreen)', value: true, core: true, comment: null, unit: null, icon: null, properties: null}
                                    - {type: property, name: Skärmstorlek, value: 6.5, core: true, comment: null, unit: tum, icon: null, properties: null}
                                    - {type: property, name: '4G (LTE)', value: true, core: true, comment: null, unit: null, icon: null, properties: [{type: property, name: '4G: Hastighet (ned/upp)', value: null, core: null, comment: null, unit: Mbit/s, icon: null, properties: null}]}
                                    - {type: property, name: Lagringsutrymme, value: 128, core: true, comment: null, unit: GB, icon: null, properties: null}
                                    - {type: property, name: Operativsystem, value: 'Android 10 (Android Q)', core: true, comment: null, unit: null, icon: null, properties: null}
                                    - {type: property, name: Lanseringsår, value: '2019', core: true, comment: null, unit: null, icon: null, properties: null}
        ProductsWithPagingResponse:
            description: 'Product details and offers with paging.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            data:
                                $ref: '#/components/schemas/ProductArray'
                            links:
                                $ref: '#/components/schemas/Links'
                    example:
                        links:
                            next: 'https://api.pj.nu/partner-search/products/market=se&offset=2&limit=2'
                            prev: null
                        data:
                            -
                                productId: '5248850'
                                productName: 'Samsung Galaxy A51 SM-A515F/DS Dual SIM 4GB RAM 128GB'
                                productPage: 'https://www.prisjakt.nu/produkt.php?p=5248850'
                                category:
                                    id: '103'
                                    name: Mobiltelefoner
                                    rank: 317
                                brand:
                                    name: Samsung
                                images:
                                    small: 'https://pricespy-75b8.kxcdn.com/product/standard/140/5248850.jpg'
                                    medium: 'https://pricespy-75b8.kxcdn.com/product/standard/280/5248850.jpg'
                                    large: 'https://pricespy-75b8.kxcdn.com/product/standard/800/5248850.jpg'
                                offers:
                                    - {price: {value: 1500, currency: SEK, includingShipping: 1550}, salesPrice: null, memberPrice: null, originalPrice: null, url: 'link to offer', condition: new, shop: {id: 36041, name: PhoneHero, logo: {small: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/88/1/36041.png', large: 'https://pricespy-75b8.kxcdn.com/g/ftg_logos/sizes/176/1/36041.png'}}, alternativePrices: [{price: {value: 1500, currency: SEK}, url: 'link to offer'}, {price: {value: 1500, currency: SEK}, url: 'link to offer'}]}
                                properties:
                                    - {type: category, name: Connections, value: null, unit: null, icon: null, properties: [{type: boolean, name: 'Hörlursutgång (2,5/3,5 mm)', value: false, unit: null, icon: null, properties: []}, {type: string, name: Dataanslutning, unit: null, value: USB, icon: null, properties: [{type: string, name: 'Typ av USB-kontakt', unit: null, value: 'USB (Typ C)', icon: null}]}]}
                                coreProperties:
                                    - {type: property, name: 'Pekskärm (touchscreen)', value: true, core: true, comment: null, unit: null, icon: null, properties: null}
                                    - {type: property, name: Skärmstorlek, value: 6.5, core: true, comment: null, unit: tum, icon: null, properties: null}
                                    - {type: property, name: '4G (LTE)', value: true, core: true, comment: null, unit: null, icon: null, properties: [{type: property, name: '4G: Hastighet (ned/upp)', value: null, core: null, comment: null, unit: Mbit/s, icon: null, properties: null}]}
                                    - {type: property, name: Lagringsutrymme, value: 128, core: true, comment: null, unit: GB, icon: null, properties: null}
                                    - {type: property, name: Operativsystem, value: 'Android 10 (Android Q)', core: true, comment: null, unit: null, icon: null, properties: null}
                                    - {type: property, name: Lanseringsår, value: '2019', core: true, comment: null, unit: null, icon: null, properties: null}
        UnauthorizedError:
            description: 'Authentication information is missing or invalid.'
            headers:
                WWW_Authenticate:
                    schema:
                        type: string
        BadRequestError:
            description: 'Request is malformed or invalid.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            error:
                                type: string
                text/plain:
                    schema:
                        type: string
                        example: 'Unknown market.'
        UnprocessableEntityError:
            description: 'Request parameter is valid but cannot be processed.'
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            error:
                                type: string
    schemas:
        V2ErrorDetail:
            properties:
                title:
                    type: string
                message:
                    type: string
            required:
                - title
                - message
            type: object
            additionalProperties: false
        V2ErrorResponse:
            properties:
                title:
                    type: string
                message:
                    type: string
                details:
                    items:
                        $ref: '#/components/schemas/V2ErrorDetail'
                    type: array
            required:
                - title
                - message
            type: object
            additionalProperties: false
        V2Brand:
            properties:
                id:
                    type: integer
                    format: int32
                    description: 'The Prisjakt brand id'
                name:
                    type: string
                    description: 'The brand name'
            required:
                - id
                - name
            type: object
            additionalProperties: false
        Nullable_string_:
            type: string
            nullable: true
        PagingLinks:
            properties:
                next:
                    $ref: '#/components/schemas/Nullable_string_'
                    description: 'Pagination link for next set of of results. Null when no next set.'
                self:
                    type: string
                    description: 'Current pagination link'
                prev:
                    $ref: '#/components/schemas/Nullable_string_'
                    description: 'Pagination link for previous set of results. Null when no previous set.'
            required:
                - next
                - self
                - prev
            type: object
        Limitable:
            properties:
                limit:
                    type: number
                    format: double
                    description: 'The maximum number of results per set'
            required:
                - limit
            type: object
            additionalProperties: false
        Nullable_number_:
            type: number
            format: double
            nullable: true
        UntotaledOffsetInfo:
            allOf:
                -
                    $ref: '#/components/schemas/Limitable'
                -
                    properties:
                        nextOffset:
                            $ref: '#/components/schemas/Nullable_number_'
                            description: 'The next offset'
                        offset:
                            type: number
                            format: double
                            description: 'The current offset'
                        prevOffset:
                            $ref: '#/components/schemas/Nullable_number_'
                            description: 'The previous offset'
                    required:
                        - nextOffset
                        - offset
                        - prevOffset
                    type: object
        Nullable_V2Brand_:
            allOf:
                -
                    $ref: '#/components/schemas/V2Brand'
            nullable: true
        V2ProductCondition:
            type: string
            enum:
                - CONDITION_NEW
                - CONDITION_DEMO
                - CONDITION_USED
                - CONDITION_REFURBISHED
                - CONDITION_DAMAGED_PACKAGING
                - CONDITION_ALMOST_NEW
        Currency:
            type: string
            enum:
                - DKK
                - EUR
                - GBP
                - NOK
                - NZD
                - SEK
            example: EUR
            format: currency
            description: 'Prisjakt currencies in ISO 4217 format.'
        V2Currency:
            $ref: '#/components/schemas/Currency'
            example: EUR
            format: currency
            description: 'Prisjakt currencies in ISO 4217 format.'
        Nullable_V2Currency_:
            allOf:
                -
                    $ref: '#/components/schemas/V2Currency'
            nullable: true
        V2Price:
            properties:
                value:
                    type: number
                    format: double
                currency:
                    $ref: '#/components/schemas/Nullable_V2Currency_'
            required:
                - value
                - currency
            type: object
            additionalProperties: false
        V2PriceWithTimebound:
            properties:
                value:
                    type: number
                    format: double
                currency:
                    $ref: '#/components/schemas/Nullable_V2Currency_'
                start:
                    $ref: '#/components/schemas/Nullable_string_'
                end:
                    $ref: '#/components/schemas/Nullable_string_'
            required:
                - value
                - currency
                - start
                - end
            type: object
            additionalProperties: false
        Nullable_V2PriceWithTimebound_:
            allOf:
                -
                    $ref: '#/components/schemas/V2PriceWithTimebound'
            nullable: true
        V2Shop:
            properties:
                id:
                    type: integer
                    format: int32
                    description: 'Prisjakt shop id'
                name:
                    type: string
                logo:
                    properties:
                        large:
                            $ref: '#/components/schemas/Nullable_string_'
                        small:
                            $ref: '#/components/schemas/Nullable_string_'
                    required:
                        - large
                        - small
                    type: object
            required:
                - id
                - name
                - logo
            type: object
            additionalProperties: false
        V2StockStatus:
            type: string
            enum:
                - UNKNOWN
                - IN_STOCK
                - PREORDER
                - BACKORDER
                - OUT_OF_STOCK
        Nullable_V2StockStatus_:
            allOf:
                -
                    $ref: '#/components/schemas/V2StockStatus'
            nullable: true
        V2Offer:
            properties:
                url:
                    type: string
                offerName:
                    type: string
                    description: 'The shop''s name of the product as stated in the offer.'
                productCondition:
                    $ref: '#/components/schemas/V2ProductCondition'
                    description: 'The condition that the offered product is in, e.g. "CONDITION_NEW", "CONDITION_REFURBISHED"'
                currentPrice:
                    $ref: '#/components/schemas/V2Price'
                    description: 'The current price provided by the shop (excluding shipping).'
                memberPrice:
                    $ref: '#/components/schemas/Nullable_V2PriceWithTimebound_'
                    description: 'The member price if provided by the shop (excluding shipping), otherwise this field will be null.'
                salesPrice:
                    $ref: '#/components/schemas/Nullable_V2PriceWithTimebound_'
                    description: 'The sales price if provided by the shop (excluding shipping), otherwise this field will be null.'
                originalPrice:
                    $ref: '#/components/schemas/Nullable_V2PriceWithTimebound_'
                    description: 'The original price if provided by the shop (excluding shipping), otherwise this field will be null.'
                shop:
                    $ref: '#/components/schemas/V2Shop'
                    description: 'Shop information.'
                stockStatus:
                    $ref: '#/components/schemas/Nullable_V2StockStatus_'
                    description: 'The stock status of the product.'
            required:
                - url
                - offerName
                - productCondition
                - currentPrice
                - memberPrice
                - salesPrice
                - originalPrice
                - shop
                - stockStatus
            type: object
            additionalProperties: false
        V2Category:
            properties:
                id:
                    type: integer
                    format: int32
                    description: 'Prisjakt category id'
                name:
                    type: string
                    description: 'Name of the category on Prisjakt.'
            required:
                - id
                - name
            type: object
            additionalProperties: false
        Nullable_V2Category_:
            allOf:
                -
                    $ref: '#/components/schemas/V2Category'
            nullable: true
        V2Product:
            properties:
                id:
                    type: integer
                    format: int32
                    description: 'The unique id of the product'
                name:
                    type: string
                    description: 'The product name in its original language (unlocalized)'
                brand:
                    $ref: '#/components/schemas/Nullable_V2Brand_'
                    description: 'Brand the product belongs to.'
                offers:
                    items:
                        $ref: '#/components/schemas/V2Offer'
                    type: array
                    description: 'Offers that exist for this product'
                productPage:
                    type: string
                    description: 'Link to the product on Prisjakt (rather than e.g. the shop)'
                category:
                    $ref: '#/components/schemas/Nullable_V2Category_'
                    description: 'Category of the product'
                rankWithinCategory:
                    $ref: '#/components/schemas/Nullable_number_'
                    description: 'The product''s rank in the category on Prisjakt.'
            required:
                - id
                - name
                - brand
                - offers
                - productPage
                - category
                - rankWithinCategory
            type: object
            additionalProperties: false
        Pageable_V2Product.UntotaledOffsetInfo_:
            properties:
                links:
                    $ref: '#/components/schemas/PagingLinks'
                    description: 'Navigable pagination links'
                paging:
                    $ref: '#/components/schemas/UntotaledOffsetInfo'
                    description: 'Pagination information'
                data:
                    items:
                        $ref: '#/components/schemas/V2Product'
                    type: array
                    description: 'The data associated with the response'
            required:
                - links
                - paging
                - data
            type: object
            additionalProperties: false
        UntotaledPageableOffset_V2Product_:
            $ref: '#/components/schemas/Pageable_V2Product.UntotaledOffsetInfo_'
        Market:
            type: string
            enum:
                - se
                - no
                - dk
                - fi
                - fr
                - gb
                - nz
        FindProductsArgs:
            properties:
                market:
                    $ref: '#/components/schemas/Market'
                    description: 'Prisjakt market as ISO 3166-1 alpha-2 country code (lowercase).'
                    example: gb
                ref:
                    type: string
                    description: "Referral Partner Id to add to offer urls.\nUnique per partner, and is used to attribute traffic."
                limit:
                    type: integer
                    format: int32
                    description: 'Maximum number of results to include in the response'
                    minimum: 0
                    maximum: 250
                offset:
                    type: integer
                    format: int32
                    description: 'Results offset index, beginning from 0'
                    minimum: 0
                productIds:
                    type: string
                    description: 'A comma-delimited list of up to 20 product ids'
                    pattern: '^[0-9]+(,[0-9]+){0,19}$'
                gtins:
                    type: string
                    description: 'A comma-delimited list of up to 10 GTIN ids'
                    pattern: '^[0-9]+(,[0-9]+){0,9}$'
            required:
                - market
                - ref
            type: object
            additionalProperties: false
        GetProductArgs:
            properties:
                market:
                    $ref: '#/components/schemas/Market'
                    description: 'Prisjakt market as ISO 3166-1 alpha-2 country code (lowercase).'
                    example: gb
                ref:
                    type: string
                    description: "Referral Partner Id to add to offer urls.\nUnique per partner, and is used to attribute traffic."
                limit:
                    type: integer
                    format: int32
                    description: 'Maximum number of results to include in the response'
                    minimum: 0
                    maximum: 250
                offset:
                    type: integer
                    format: int32
                    description: 'Results offset index, beginning from 0'
                    minimum: 0
            required:
                - market
                - ref
            type: object
            additionalProperties: false
        Suggestion:
            description: 'Search result.'
            type: object
            properties:
                productId:
                    description: 'Prisjakt product ID.'
                    type: string
                productName:
                    $ref: '#/components/schemas/ProductName'
                productPage:
                    $ref: '#/components/schemas/ProductPage'
                category:
                    description: 'Category information for the product.'
                    type: object
                    properties:
                        id:
                            $ref: '#/components/schemas/CategoryId'
                        name:
                            $ref: '#/components/schemas/CategoryName'
                        rank:
                            $ref: '#/components/schemas/CategoryRank'
                brand:
                    $ref: '#/components/schemas/Brand'
                images:
                    $ref: '#/components/schemas/Images'
                lowestPrice:
                    $ref: '#/components/schemas/SearchOffer'
        Category:
            type: object
            properties:
                id:
                    $ref: '#/components/schemas/CategoryId'
                name:
                    $ref: '#/components/schemas/CategoryName'
                url:
                    type: string
                logo:
                    type: string
                slug:
                    type: string
        CategoryId:
            description: 'Prisjakt category ID.'
            type: string
        CategoryName:
            description: 'Name of the category on Prisjakt.'
            type: string
        CategoryRank:
            description: 'The products rank in the category on Prisjakt.'
            type: number
        ProductId:
            description: 'Prisjakt product ID.'
            type: string
        ProductName:
            description: 'Name of the product.'
            type: string
        ProductPage:
            description: 'Link to the product on Prisjakt.'
            type: string
        Product:
            type: object
            properties:
                productId:
                    $ref: '#/components/schemas/ProductId'
                productName:
                    $ref: '#/components/schemas/ProductName'
                productPage:
                    $ref: '#/components/schemas/ProductPage'
                category:
                    description: 'Category information for the product.'
                    type: object
                    properties:
                        id:
                            $ref: '#/components/schemas/CategoryId'
                        name:
                            $ref: '#/components/schemas/CategoryName'
                        rank:
                            $ref: '#/components/schemas/CategoryRank'
                brand:
                    $ref: '#/components/schemas/Brand'
                properties:
                    type: array
                    items:
                        $ref: '#/components/schemas/ProductProperty'
                coreProperties:
                    type: array
                    items:
                        $ref: '#/components/schemas/ProductProperty'
                images:
                    $ref: '#/components/schemas/Images'
                offers:
                    type: array
                    items:
                        $ref: '#/components/schemas/Offer'
        ProductArray:
            type: array
            items:
                $ref: '#/components/schemas/Product'
        ProductProperty:
            type: object
            properties:
                type:
                    type: string
                name:
                    type: string
                value:
                    type: string
                core:
                    type: boolean
                unit:
                    type: string
                icon:
                    type: string
                properties:
                    description: 'List of product properties related to this product property.'
                    type: array
                    items:
                        $ref: '#/components/schemas/ProductProperty'
        Images:
            description: 'Product images.'
            type: object
            properties:
                small:
                    type: string
                medium:
                    type: string
                large:
                    type: string
        Shop:
            description: 'Shop information.'
            type: object
            properties:
                id:
                    description: 'Shop Id on Prisjakt.'
                    type: number
                name:
                    description: 'Name of the shop.'
                    type: string
                logo:
                    description: 'Shop logos.'
                    type: object
                    properties:
                        small:
                            type: string
                        large:
                            type: string
        Offer:
            type: object
            properties:
                url:
                    type: string
                price:
                    $ref: '#/components/schemas/PriceWithShipping'
                memberPrice:
                    $ref: '#/components/schemas/MemberPrice'
                salesPrice:
                    $ref: '#/components/schemas/SalesPrice'
                originalPrice:
                    $ref: '#/components/schemas/OriginalPrice'
                alternativePrices:
                    type: array
                    items:
                        type: object
                        properties:
                            url:
                                type: string
                            price:
                                $ref: '#/components/schemas/Price'
                shop:
                    $ref: '#/components/schemas/Shop'
        SearchOffer:
            description: 'The offer with the lowest price.'
            type: object
            properties:
                url:
                    description: 'Link to the shop''s offer. `client_id=1521` is used to indicate the source of this URL; the partner API.'
                    example: 'https://www.prisjakt.nu/go-to-shop/shop_id/offer/offer_id?client_id=1521&partner_id=<your-ref-id>'
                    type: string
                price:
                    $ref: '#/components/schemas/PriceWithShipping'
                memberPrice:
                    $ref: '#/components/schemas/MemberPrice'
                salesPrice:
                    $ref: '#/components/schemas/SalesPrice'
                originalPrice:
                    $ref: '#/components/schemas/OriginalPrice'
                priceTrend:
                    $ref: '#/components/schemas/PriceTrend'
                shop:
                    $ref: '#/components/schemas/Shop'
        PriceWithShipping:
            $ref: '#/components/schemas/Price'
            includingShipping:
                description: 'Price including shipping.'
                type: number
        Price:
            description: 'The shops current price.'
            type: object
            properties:
                value:
                    type: number
                currency:
                    type: string
                    example: SEK
        OriginalPrice:
            description: 'The original price if provided by the shop, otherwise this field will be null.'
            type: object
            properties:
                start:
                    $ref: '#/components/schemas/Start'
                end:
                    $ref: '#/components/schemas/End'
                value:
                    type: number
                currency:
                    type: string
                    example: SEK
            nullable: true
        MemberPrice:
            description: 'The member price if provided by the shop, otherwise this field will be null.'
            type: object
            properties:
                start:
                    $ref: '#/components/schemas/Start'
                end:
                    $ref: '#/components/schemas/End'
                value:
                    type: number
                currency:
                    type: string
                    example: SEK
            nullable: true
        SalesPrice:
            description: 'The sales price if provided by the shop, otherwise this field will be null.'
            type: object
            properties:
                start:
                    $ref: '#/components/schemas/Start'
                end:
                    $ref: '#/components/schemas/End'
                value:
                    type: number
                currency:
                    type: string
                    example: SEK
            nullable: true
        Brand:
            description: 'Brand the product belongs to.'
            type: object
            properties:
                name:
                    type: string
        PriceTrend:
            description: 'We track the price trend for three months and compare it to the current price of the product. If the price is below the price trend this field will contain the percentage.  See [this section](https://developer.prisjakt.nu/docs/sections/for-partners/integrations/partner-search/#cookbook-prisjakt-daily-deals) for details about price trend'
            type: object
            properties:
                percentage:
                    description: 'Percent below the price trend over the past 90 days.'
                    type: number
            nullable: true
        Start:
            description: 'The start date.'
            type: string
            nullable: true
        End:
            description: 'The end date.'
            type: string
            nullable: true
        Links:
            description: 'Links to next and previous page of results.'
            type: object
            properties:
                next:
                    description: 'Link to next page of results.'
                    enum:
                        - string
                        - null
                prev:
                    description: 'Link to previous page of results.'
                    enum:
                        - string
                        - null
    securitySchemes:
        accessToken:
            type: http
            scheme: bearer
            bearerFormat: JWT
info:
    title: 'Partner Search API'
    version: 1.0.0
    description: 'Product search for partners'
    license:
        name: UNLICENSED
    contact: {}
openapi: 3.0.0
paths:
    /v2/brands:
        get:
            operationId: getBrandsV2
            responses:
                '200':
                    description: Ok
                    content:
                        application/json:
                            schema:
                                items:
                                    $ref: '#/components/schemas/V2Brand'
                                type: array
                '401':
                    description: Unauthorized
                '500':
                    description: 'Unhandled Error'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
            description: 'Get a list of all brands available in the Prisjakt catalogue.'
            summary: 'Get all brands.'
            tags:
                - BrandsV2
            security:
                -
                    accessToken: []
            parameters: []
    /v2/brands/download:
        get:
            operationId: downloadBrandsV2
            responses:
                '200':
                    description: Ok
                    content:
                        application/json:
                            schema:
                                type: string
                '401':
                    description: Unauthorized
                '500':
                    description: 'Unhandled Error'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
            description: 'Download all brands as a CSV file with columns: id, name.'
            summary: 'Download all brands as CSV.'
            tags:
                - BrandsV2
            security:
                -
                    accessToken: []
            parameters: []
    /experimental/products:
        get:
            operationId: findProductsV2
            responses:
                '200':
                    description: Ok
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UntotaledPageableOffset_V2Product_'
                '400':
                    description: 'Bad Request'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
                '401':
                    description: Unauthorized
                '500':
                    description: 'Unhandled Error'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
            description: "Search for product information and their offers in stock.\nThe API only returns offers that are available for purchase. Offers that are out of stock or not available for purchase are not included in the response."
            summary: 'Search for product information and their offers in stock.'
            tags:
                - ProductsV2
            security:
                -
                    accessToken: []
            parameters:
                -
                    description: 'Prisjakt market as ISO 3166-1 alpha-2 country code (lowercase).'
                    in: query
                    name: market
                    required: true
                    schema:
                        $ref: '#/components/schemas/Market'
                -
                    description: "Referral Partner Id to add to offer urls.\nUnique per partner, and is used to attribute traffic."
                    in: query
                    name: ref
                    required: true
                    schema:
                        type: string
                -
                    description: 'Maximum number of results to include in the response'
                    in: query
                    name: limit
                    required: false
                    schema:
                        format: int32
                        type: integer
                        minimum: 0
                        maximum: 250
                -
                    description: 'Results offset index, beginning from 0'
                    in: query
                    name: offset
                    required: false
                    schema:
                        format: int32
                        type: integer
                        minimum: 0
                -
                    description: 'A comma-delimited list of up to 20 product ids'
                    in: query
                    name: productIds
                    required: false
                    schema:
                        type: string
                        pattern: '^[0-9]+(,[0-9]+){0,19}$'
                -
                    description: 'A comma-delimited list of up to 10 GTIN ids'
                    in: query
                    name: gtins
                    required: false
                    schema:
                        type: string
                        pattern: '^[0-9]+(,[0-9]+){0,9}$'
    '/experimental/products/{productId}':
        get:
            operationId: getProductV2
            responses:
                '200':
                    description: Ok
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2Product'
                '400':
                    description: 'Bad Request'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
                '401':
                    description: Unauthorized
                '404':
                    description: 'Product not found'
                '500':
                    description: 'Unhandled Error'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/V2ErrorResponse'
            description: "Get product information and its offers for one specific product.\nThe API only returns offers that are available for purchase. Offers that are out of stock or not available for purchase are not included in the response."
            summary: 'Get product information and its offers in stock for one specific product.'
            tags:
                - ProductsV2
            security:
                -
                    accessToken: []
            parameters:
                -
                    description: 'Single product id, for example ```5248850```'
                    in: path
                    name: productId
                    required: true
                    schema:
                        format: double
                        type: number
                -
                    description: 'Prisjakt market as ISO 3166-1 alpha-2 country code (lowercase).'
                    in: query
                    name: market
                    required: true
                    schema:
                        $ref: '#/components/schemas/Market'
                -
                    description: "Referral Partner Id to add to offer urls.\nUnique per partner, and is used to attribute traffic."
                    in: query
                    name: ref
                    required: true
                    schema:
                        type: string
                -
                    description: 'Maximum number of results to include in the response'
                    in: query
                    name: limit
                    required: false
                    schema:
                        format: int32
                        type: integer
                        minimum: 0
                        maximum: 250
                -
                    description: 'Results offset index, beginning from 0'
                    in: query
                    name: offset
                    required: false
                    schema:
                        format: int32
                        type: integer
                        minimum: 0
    /suggestions:
        get:
            summary: 'Find products'
            description: "Use the suggestions endpoint to filter products with a particularly good price right now. It can also be used to find products matching a text query.\n\nThe response will contain a list of products matching the query arguments with product information, and the offer with the current lowest price."
            operationId: getSuggestions
            security:
                -
                    accessToken: []
            tags:
                - 'Product search'
            parameters:
                -
                    $ref: '#/components/parameters/market'
                -
                    $ref: '#/components/parameters/product'
                -
                    $ref: '#/components/parameters/category'
                -
                    $ref: '#/components/parameters/limit'
                -
                    $ref: '#/components/parameters/offset'
                -
                    $ref: '#/components/parameters/refId'
                -
                    $ref: '#/components/parameters/filterCategory'
                -
                    $ref: '#/components/parameters/filterPriceTrend'
                -
                    $ref: '#/components/parameters/filterMinPriceTrend'
                -
                    $ref: '#/components/parameters/filterMaxPriceTrend'
                -
                    $ref: '#/components/parameters/filterAllCondition'
                -
                    $ref: '#/components/parameters/filterSecondGradeConditionOnly'
                -
                    $ref: '#/components/parameters/filterSalePriceOnly'
            responses:
                '200':
                    $ref: '#/components/responses/SuggestionResponse'
                '400':
                    $ref: '#/components/responses/BadRequestError'
                '401':
                    $ref: '#/components/responses/UnauthorizedError'
                '422':
                    $ref: '#/components/responses/UnprocessableEntityError'
    /categories:
        get:
            summary: 'Find categories.'
            operationId: getCategories
            description: "The categories endpoint enables you to find Prisjakt categories corresponding to a text query.\n\nMake a request with the q query parameter e.g. `/categories?market=se&q=apple phone`.\nThe response will contain category leaf ids, slugs, names, urls to the category in the website, and logos for the categories matching the query.\nYou can use the offset and limit query parameters to page through the results.\n\nThe category id or slug can be used on endpoints that have the `filter[category]` query parameter to filter by that category.\n"
            security:
                -
                    accessToken: []
            tags:
                - 'Category search'
            parameters:
                -
                    $ref: '#/components/parameters/market'
                -
                    $ref: '#/components/parameters/q'
                -
                    $ref: '#/components/parameters/limit'
                -
                    $ref: '#/components/parameters/offset'
                -
                    $ref: '#/components/parameters/refId'
            responses:
                '200':
                    $ref: '#/components/responses/CategoriesResponse'
                '400':
                    $ref: '#/components/responses/BadRequestError'
                '401':
                    $ref: '#/components/responses/UnauthorizedError'
                '422':
                    $ref: '#/components/responses/UnprocessableEntityError'
    /products:
        get:
            operationId: getProducts
            summary: 'Provides product information and offers in stock.'
            description: "You can use the products endpoint to fetch product information and offers. Fetch data by calling `/products` or set the GTIN query parameter to find matching products. Use the offset and limit query parameters to page through the results.\n\nThe API only returns offers that are available for purchase. Offers that are out of stock or not available for purchase are not included in the response.\n"
            security:
                -
                    accessToken: []
            tags:
                - 'Product Information'
            parameters:
                -
                    $ref: '#/components/parameters/market'
                -
                    $ref: '#/components/parameters/prodLimit'
                -
                    $ref: '#/components/parameters/offset'
                -
                    $ref: '#/components/parameters/filterCategory'
                -
                    $ref: '#/components/parameters/refId'
                -
                    $ref: '#/components/parameters/gtin'
            responses:
                '200':
                    $ref: '#/components/responses/ProductsWithPagingResponse'
                '400':
                    $ref: '#/components/responses/BadRequestError'
                '401':
                    $ref: '#/components/responses/UnauthorizedError'
                '422':
                    $ref: '#/components/responses/UnprocessableEntityError'
    '/products/{productId}':
        get:
            operationId: getProductsById
            summary: 'Provides product information and offers in stock for specific products.'
            description: "You can use the products endpoint to fetch product information and offers with a using single or multiple product ids.\nSimply set the productId path parameter to the product id e.g ```products/5248850``` or using multiple ids\ne.g ```products/5248850,5248851```. Up to 20 ids can be used.\n\nThe API only returns offers that are available for purchase. Offers that are out of stock or not available for purchase are not included in the response.\n"
            security:
                -
                    accessToken: []
            tags:
                - 'Product Information'
            parameters:
                -
                    $ref: '#/components/parameters/market'
                -
                    $ref: '#/components/parameters/refId'
                -
                    in: path
                    name: productId
                    description: 'Either one or a comma-separated list of product IDs (min 1, max 20)'
                    schema:
                        type: string
                    required: true
            responses:
                '200':
                    $ref: '#/components/responses/ProductResponse'
                '400':
                    $ref: '#/components/responses/BadRequestError'
                '401':
                    $ref: '#/components/responses/UnauthorizedError'
                '422':
                    $ref: '#/components/responses/UnprocessableEntityError'
servers:
    -
        url: 'https://api.pj.nu/partner-search'
        description: 'Production environment'
    -
        url: 'https://dev-api.pj.nu/partner-search'
        description: 'Development environment'
