### Installation Response Structure Source: https://api.otto.market/docs/sp-integration This is an example of the JSON response received when retrieving installation details. It includes the primary installationId and a list of existing installations. ```json { "installationId": "string", "appVersion": "V3", "existingInstallations": [ { "installationId": "string", "state": "ENABLED", "appVersion": "V1" } ] } ``` -------------------------------- ### Example: Start Date in the Past Error Source: https://api.otto.market/docs/openapi.yml This example shows the error response when the provided 'startDate' is in the past. ```JSON { "errors": [ { "message": "'startDate' must be today or a future date.", "field": "startDate" } ], "timestamp": "2026-04-15T10:00:00Z" } ``` -------------------------------- ### Retrieve Installation Access Token Source: https://api.otto.market/docs/sp-integration After obtaining a developer access token, use this POST request to get an installation access token. Ensure the Host and Authorization headers are correctly set. ```http POST /v1/apps/{appId}/installations/{installationId}/accessToken HTTP/1.1 Host: sandbox.api.otto.market or api.otto.market Authorization: Bearer {access_token} Content-Type: application/x-www-form-urlencoded scope={SCOPE_VALUES} ``` -------------------------------- ### Example Response for Get Quantity Source: https://api.otto.market/docs/api-docs Illustrates a successful response when retrieving the quantity for a given SKU. ```json { "lastModified": "2024-07-18T07:20:06.260124Z", "quantity": 123, "sku": "123456789ABCDE" } ``` -------------------------------- ### Example: Update Campaign Budget Source: https://api.otto.market/docs/openapi.yml This example demonstrates updating only the budget of a campaign, specifying the amount and currency. ```JSON { "budget": { "amount": 15000, "currency": "EUR" } } ``` -------------------------------- ### List of Orders Example Source: https://api.otto.market/docs/openapi.yml This example shows the structure for a list of orders, including details for each order, its items, and associated costs. ```json { "resources": [ { "salesOrderId": "8bd8a7cb-1ce1-4024-bdec-1c60de3c8006", "orderNumber": "bwvdp9gcyk", "orderDate": "2021-03-31T09:45:52.313+0000", "lastModifiedDate": "2021-03-31T10:30:52.434+0000", "positionItems": [ { "positionItemId": "41d73c45-6177-4230-8907-4ffafd09064e", "fulfillmentStatus": "ANNOUNCED", "dealName": "Deal der Woche 52", "dealId": "b65ef4bc-8f28-4fdd-a14a-b30b98449698", "itemValueGrossPrice": { "amount": 13.37, "currency": "EUR" }, "product": { "sku": "P4567", "productTitle": "Red T-Shirt", "articleNumber": "X2G1D12FT8", "ean": "4606938545083", "vatRate": 19 } } ], "orderLifecycleInformation": { "lifecycleChangeDate": "2021-03-31T10:30:52.433+0000" }, "payment": { "paymentMethod": "PREPAYMENT" }, "initialDeliveryFees": [ { "name": "DELIVERY_FEE_STANDARD", "deliveryFeeAmount": { "amount": 5.95, "currency": "EUR" }, "positionItemIds": [ "41d73c45-6177-4230-8907-4ffafd09064e" ], "vatRate": 19 } ], "links": [ { "rel": "self", "href": "/v4/orders/8bd8a7cb-1ce1-4024-bdec-1c60de3c8006" } ] }, { "salesOrderId": "02807492-35b8-46a1-9493-ac34ba006da0", "orderNumber": "cwvcp4gvyy", "orderDate": "2021-04-15T12:19:49.007+0000", "lastModifiedDate": "2021-04-15T13:04:51.121+0000", "positionItems": [ { "positionItemId": "50606ce0-fb36-47af-b5f2-30e18da115b4", "fulfillmentStatus": "ANNOUNCED", "itemValueGrossPrice": { "amount": 11.49, "currency": "EUR" }, "product": { "sku": "T7781", "productTitle": "Blue Socks", "articleNumber": "Y7G1D73GH1", "vatRate": 19 } } ], "orderLifecycleInformation": { "lifecycleChangeDate": "2021-04-15T13:04:51.112+0000" }, "payment": { "paymentMethod": "PREPAYMENT" }, "initialDeliveryFees": [ { "name": "DELIVERY_FEE_STANDARD", "deliveryFeeAmount": { "amount": 5.95, "currency": "EUR" }, "positionItemIds": [ "50606ce0-fb36-47af-b5f2-30e18da115b4" ], "vatRate": 19 } ], "links": [ { "rel": "self", "href": "/v4/orders/02807492-35b8-46a1-9493-ac34ba006da0" } ] } ] } ``` -------------------------------- ### Installation Access Token Response Source: https://api.otto.market/docs/sp-integration This is the expected JSON response when successfully retrieving an installation access token. The 'access_token' is used for authenticating subsequent API calls. ```json { "access_token": "token", "expires_in": 1800 } ``` -------------------------------- ### Example: Empty Patch Request Source: https://api.otto.market/docs/openapi.yml This example shows an invalid request where no fields are provided in the patch, which will result in an error. ```JSON { "errors": [ { "message": "At least one field must be provided." } ], "timestamp": "2026-04-15T10:00:00Z" } ``` -------------------------------- ### Get Quantities Request Sample Source: https://api.otto.market/docs/api-docs This snippet shows how to make a GET request to retrieve available quantities. It includes parameters for limit, page, cursor, and authorization. ```curl curl --request GET \ --url 'https://api.otto.market/v1/availability/quantities?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&cursor=c2t1NDM%3D' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Example Order Response (JSON) Source: https://api.otto.market/docs/api-docs This is an example of a successful JSON response (200 OK) when retrieving an order. It includes details about the order, its items, and lifecycle information. ```json { "salesOrderId": "8bd8a7cb-1ce1-4024-bdec-1c60de3c8006", "orderNumber": "bwvdp9gcyk", "orderDate": "2021-03-31T09:45:52.313+0000", "lastModifiedDate": "2021-03-31T10:30:52.434+0000", "positionItems": [ { "positionItemId": "41d73c45-6177-4230-8907-4ffafd09064e", "fulfillmentStatus": "ANNOUNCED", "dealName": "Deal der Woche 52", "dealId": "b65ef4bc-8f28-4fdd-a14a-b30b98449698", "itemValueGrossPrice": { "amount": 13.37, "currency": "EUR" }, "product": { "sku": "P4567", "productTitle": "Red T-Shirt", "articleNumber": "X2G1D12FT8", "ean": "4606938545083", "vatRate": 19 } } ], "orderLifecycleInformation": { "lifecycleChangeDate": "2021-03-31T10:30:52.433+0000" }, "payment": { "paymentMethod": "PREPAYMENT" }, "initialDeliveryFees": [ { "name": "DELIVERY_FEE_STANDARD", "deliveryFeeAmount": { "amount": 5.95, "currency": "EUR" }, "positionItemIds": [ "41d73c45-6177-4230-8907-4ffafd09064e" ], "vatRate": 19 } ], "links": [ { "rel": "self", "href": "/v4/orders/8bd8a7cb-1ce1-4024-bdec-1c60de3c8006" } ] } ``` -------------------------------- ### Get a Specific Receipt using Httpie Source: https://api.otto.market/docs/openapi.yml This example demonstrates how to fetch a specific receipt using the Httpie command-line tool. Replace 'REPLACE_BEARER_TOKEN' with your valid bearer token. ```Shell http GET https://api.otto.market/v3/receipts/R-DE-123456789-2020-1507 \ Authorization:'Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Get Product Delivery Information (Shell + Curl) Source: https://api.otto.market/docs/api-docs This snippet shows how to make a GET request to retrieve product delivery information. It includes parameters for limit and cursor, and requires an Authorization header. ```shell curl --request GET \ --url 'https://api.otto.market/v1/availability/product-delivery-information?limit=SOME_INTEGER_VALUE&cursor=c2t1NDM%3D' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Retrieve Installation Access Token Source: https://api.otto.market/docs/sp-integration Obtain an installation access token using the developer access token. This token is then used to authenticate requests to OTTO Market APIs. ```APIDOC ## POST /v1/apps/{appId}/installations/{installationId}/accessToken ### Description Retrieves an installation access token using a previously obtained developer access token. This token is necessary for authenticating subsequent calls to OTTO Market APIs. ### Method POST ### Endpoint /v1/apps/{appId}/installations/{installationId}/accessToken ### Parameters #### Path Parameters - **appId** (string) - Required - The ID of the application. - **installationId** (string) - Required - The ID of the installation. #### Request Body - **scope** (string) - Required - The scope values for the access token. #### Headers - **Authorization** (string) - Required - Bearer token obtained from the previous step (e.g., Bearer {access_token}). ### Request Example ``` POST /v1/apps/{appId}/installations/{installationId}/accessToken HTTP/1.1 Host: sandbox.api.otto.market or api.otto.market Authorization: Bearer {access_token} Content-Type: application/x-www-form-urlencoded scope={SCOPE_VALUES} ``` ### Response #### Success Response (200) - **access_token** (string) - The installation access token. - **expires_in** (integer) - The token's expiration time in seconds. #### Response Example ```json { "access_token": "token", "expires_in": 1800 } ``` ``` -------------------------------- ### Example Successful Response (JSON) Source: https://api.otto.market/docs/api-docs This is an example of a successful JSON response (200 OK) containing the return warehouse address details. ```json { "returnAddressId": "38427776-7383-4d65-82c9-dbe949d0573a", "returnWarehouseType": "NATIONAL", "isMisdirectedAddress": false, "returnRecipient": "John Paul", "returnRecipientSuffix": "Dr.", "isBusinessAddress": false, "returnStreet": "Gartenstraße", "returnHouseNumber": 32, "returnZipCode": 32323, "returnCity": "Glandorf", "returnCountry": "Germany" } ``` -------------------------------- ### Paginated Shipping Profiles Response Example Source: https://api.otto.market/docs/functional-interfaces/shipping-profiles Example response structure for paginated shipping profiles, including results and links for navigation. ```json { "results": [ { "shippingProfileId": "38427776-7383-4d65-82c9-dbe949d0573a", "shippingProfileName": "TestShippingProfile", "workingDays": [ "MONDAY" ], "orderCutoff": "23:30", "deliveryType": "PARCEL", "defaultProcessingTime": 2, "transportTime": 2 } ], "links": { "rel": "next", "href": "/v1/shipping-profiles?cursor=YmExMjU4MGMtZGJhNS00NTY5LWI4NWMtN2RmNmJmMmU2Mzc1sWkpQYnA=" } } ``` -------------------------------- ### Example Shipment Response (JSON) Source: https://api.otto.market/docs/api-docs This is an example of a successful JSON response when retrieving shipments. It includes links for pagination and details about each shipment. ```json { "links": [ { "href": "/v1/shipments?next=12345678&limit=25&datefrom=2019-05-02T00:00:00Z", "rel": "next" } ], "resources": [ { "creationDate": "2019-10-11T07:49:12.642Z", "shipmentId": "101068626890", "trackingKey": { "carrier": "HERMES", "trackingNumber": "H1234567890123456789" }, "states": [ { "state": "SENT", "occurredOn": "2022-05-01T07:49:12.642Z" } ] } ] } ``` -------------------------------- ### Download Report Response Example Source: https://api.otto.market/docs/api-docs An example of a response when downloading a report. A successful download typically returns the CSV file content, while other statuses indicate errors or that the report is not ready. ```json null ``` -------------------------------- ### Update Quantities Request Example Source: https://api.otto.market/docs/openapi.yml This example shows how to structure a request to update available quantities for multiple SKUs. The request body should be a JSON array, with each object containing a 'quantity' and an 'sku'. ```json [ { "quantity": 123, "sku": "4007781056144" }, { "quantity": 123, "sku": "4007781056145" } ] ``` -------------------------------- ### Example: End Date Before Start Date Error Source: https://api.otto.market/docs/openapi.yml This example illustrates the error response when the 'endDate' is set to a date before the 'startDate'. ```JSON { "errors": [ { "message": "'endDate' must be at least one day after 'startDate'.", "field": "endDate" } ], "timestamp": "2026-04-15T10:00:00Z" } ``` -------------------------------- ### Retrieve Installation ID Source: https://api.otto.market/docs/sp-integration After authenticating the user with OTTO's IDP, use the obtained access token to make a GET request to retrieve the installation ID. This ID is essential for linking the installation to your system. ```http GET /v1/apps/{appId}/installation HTTP/1.1 Host: sandbox.api.otto.market or api.otto.market Authorization: Bearer {access_token} ``` -------------------------------- ### Product Variation Active Status Response Source: https://api.otto.market/docs/api-docs Example JSON response for a successful request to get the active status of a product variation. ```json { "sku": "82388894-5883-488", "active": true, "lastModified": "2019-06-18T06:12:36Z" } ``` -------------------------------- ### Create Product using OpenAPI Source: https://api.otto.market/docs/openapi.yml Use this cURL command to send a POST request to create a new product. Ensure you replace 'REPLACE_BEARER_TOKEN' with your actual authentication token. The request body contains detailed product information in JSON format. ```bash echo '[{"productReference":"UBN-11779","sku":"3858389911564","ean":"3858389911564","pzn":"PZN-4908802","mpn":"H2G2-42","moin":"M00A1234BC","releaseDate":"2019-10-19T00:00:00Z","productDescription":{"category":"Outdoorjacke","brandId":"CMWBBRW2","productLine":"501","productionDate":"2021-07-02T09:30:52.093Z","multiPack":true,"bundle":false,"fscCertified":true,"disposal":false,"productUrl":"http://myproduct.somewhere.com/productname/","description":"
Some example words...in bold...some more
","bulletPoints":["My top key information..."],"attributes":[{"name":"Materialzusammensetzung","values":["100% Baumwolle"],"additional":false}]},"mediaAssets":[{"type":"IMAGE","location":"http://apartners.url/image-location"}],"order":{"maxOrderQuantity":{"quantity":10,"periodInDays":7}},"pricing":{"standardPrice":{"amount":19.95,"currency":"EUR"},"vat":"FULL","msrp":{"amount":19.95,"currency":"EUR"},"sale":{"salePrice":{"amount":19.95,"currency":"EUR"},"startDate":"2019-10-19T09:30:00Z","endDate":"2019-10-19T09:30:00Z"},"normPriceInfo":{"normAmount":100,"normUnit":"g","salesAmount":500,"salesUnit":"g"}},"logistics":{"packingUnitCount":3,"packingUnits":[{"weight":365,"width":600,"height":200,"length":300}]},"compliance":{"productSafety":{"addresses":[{"name":"Die Musterfirma GmbH","address":"Musterstraße 1, 12345, Musterstadt, Deutschland","regionCode":"DE","email":"info@die-musterfirma.de","url":"https://musterfirma/kontakt-information","phone":"+ 49 40 123456789","roles":["DISTRIBUTOR"],"components":["mouse"]}]},"foodInformation":{"addresses":[{"name":"Die Musterfirma GmbH","address":"Musterstraße 1, 12345, Musterstadt, Deutschland","regionCode":"DE","email":"info@die-musterfirma.de","url":"https://musterfirma/kontakt-information","phone":"+ 49 40 123456789","roles":["FOOD_BUSINESS_OPERATOR"],"components":["Salad"]}]}}}]' | \ http POST https://api.otto.market/v5/products \ Authorization:'Bearer REPLACE_BEARER_TOKEN' \ X-Request-Timestamp:2000-10-31T01:30:10.000-05:00 \ content-type:application/json ``` -------------------------------- ### Get Change Request - Pending Status Source: https://api.otto.market/docs/openapi.yml Example of a change request that is still pending processing. The `status` field indicates that the operation has not yet been completed. ```json { "requestId": "00000004-0000-4000-8000-000000000004", "requestType": "CREATE_CAMPAIGN", "status": "PENDING", "lastModifiedAt": "2026-04-23T08:00:00Z", "_links": { "self": { "href": "https://api.otto.market/v1/sponsored-product-ads/change-requests/00000004-0000-4000-8000-000000000004" } } } ``` -------------------------------- ### Get Keywords Response (JSON) Source: https://api.otto.market/docs/api-docs This is an example of a successful JSON response when retrieving keywords. It includes a list of keywords, pagination cursors, and links to related resources. ```json { "keywords": [ { "keywordId": "08721556-ef4c-40f0-9305-68bfacb3aef7", "keyword": "string", "matchType": "EXACT", "keywordType": "POSITIVE", "bid": { "amount": 20, "currency": "EUR" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "_links": { "self": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002/keywords/00000003-0000-4000-8000-000000000003" }, "target": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002" } } } ], "nextCursor": "eyJjcmVhdGVkQXQi...", "prevCursor": "eyJjcmVhdGVkQXQi...", "_links": { "self": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002/keywords?limit=20" }, "next": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002/keywords?cursor=eyJjcmVhdGVkQXQi...&limit=20" }, "prev": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002/keywords?cursor=eyJjcmVhdGVkQXQi...&limit=20" }, "target": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001/targets/00000002-0000-4000-8000-000000000002" }, "campaign": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001" } } } ``` -------------------------------- ### Fetch Next Page of Product Delivery Information Source: https://api.otto.market/docs/functional-interfaces/availability Example of how to use the cursor parameter to retrieve the next page of product delivery information. ```HTTP GET /v1/availability/product-delivery-information?cursor=YmExMjU4MGMtZGJhNS00NTY5LWI4NWMtN2RmNmJmMmU2Mzc1sWkpQYnA= ``` -------------------------------- ### Get Change Request - Accepted Status Source: https://api.otto.market/docs/openapi.yml Example of an accepted change request, indicating successful creation of a campaign. The `entityIds` field contains the ID of the newly created campaign. ```json { "requestId": "00000004-0000-4000-8000-000000000004", "requestType": "CREATE_CAMPAIGN", "status": "ACCEPTED", "lastModifiedAt": "2026-04-23T08:00:01Z", "entityIds": [ "00000001-0000-4000-8000-000000000001" ], "_links": { "self": { "href": "https://api.otto.market/v1/sponsored-product-ads/change-requests/00000004-0000-4000-8000-000000000004" }, "entities": [ { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns/00000001-0000-4000-8000-000000000001" } ] } } ``` -------------------------------- ### Create Campaign Response Sample Source: https://api.otto.market/docs/api-docs Example JSON response after successfully submitting a request to create a sponsored product ad campaign. ```json { "changeRequest": { "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "requestType": "CREATE_CAMPAIGN", "status": "PENDING", "lastModifiedAt": "2019-08-24T14:15:22Z" }, "_links": { "self": { "href": "https://api.otto.market/v1/sponsored-product-ads/campaigns" }, "change-request": { "href": "https://api.otto.market/v1/sponsored-product-ads/change-requests/00000004-0000-4000-8000-000000000004" } } } ``` -------------------------------- ### Keyword vs search term analysis Source: https://api.otto.market/docs/openapi.yml This example allows for comparing keyword bids against actual search terms with campaign context, providing a full dimensional breakdown. ```json { "name": "Keyword Search Term Report", "fromDate": "2026-03-01", "toDate": "2026-03-23", "configuration": { "columns": [ "CAMPAIGN_ID", "TOTAL_VIEWS", "TOTAL_COSTS" ] } } ``` -------------------------------- ### PATCH Request Body Example Source: https://api.otto.market/docs/about-the-api/api-guides This example shows the structure for a PATCH request body, where only specified fields are updated. ```json { "username" : "myusername", "email" : null } ``` -------------------------------- ### Handle API Sunset and Deprecation Headers Source: https://api.otto.market/docs/about-the-api/api-guides This example shows how to interpret Sunset and Deprecation headers to manage API version transitions. It includes a successor version link. ```text Warning: v2 is deprecated. Please migrate to v3 Sunset: Sun, 01 Nov 2020 00:00:00 GMT Deprecation: Wed, 11 Nov 2018 23:59:59 GMT Link: