{"items":[{"type":"link","label":"Keeta Promotion API Reference","link":"/apis/grocery/promotion","routeSlug":"/apis/grocery/promotion","content":{"contentType":"overview","meta":{"name":"Keeta Promotion API Reference"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"promotion.json","url":"/_bundle/apis/@grocery/promotion.json?download"},{"kind":"download","label":"promotion.yaml","url":"/_bundle/apis/@grocery/promotion.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"URL","titleTranslationKey":"info.contact.url","label":"https://developers.mykeeta.com/","url":"https://developers.mykeeta.com/"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://open.mykeeta.com/api/open/grocery"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Keeta Promotion API Reference (v1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"This API provides comprehensive promotion management capabilities for Keeta platform integration, including promotion management, promotion status query and notification."}],"sectionId":"/apis/grocery/promotion"}],"sectionId":"/apis/grocery/promotion"}]}]}},{"label":"Manage Promotion","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/grocery/promotion/other/managepromotion","routeSlug":"/apis/grocery/promotion/other/managepromotion","metadata":{"seo":{"title":"Manage Promotion","description":"This endpoint allows a third-party system to create, update, or deactivate SKU-level promotions on the Keeta platform."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"managePromotion","name":"Manage Promotion","isWebhook":false,"pointer":"/paths/~1v1~1promotion~1chains~1{chainId}/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Manage Promotion","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint allows a third-party system to "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"create, update, or deactivate SKU-level promotions"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the Keeta platform."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Notes:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The request is processed "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"asynchronously"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and the processing result will be notified via webhook."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Keeta identifies a promotion by the combination of "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"sku, conditions.startTime, and conditions.endTime"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When conditions is omitted, the promotion "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"becomes effective after creation and remains effective"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" until it is updated or deactivated."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Set discount[].active to false to "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"remove the specified SKUs"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from the promotion."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"STRIKETHROUGH"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" promotions are currently supported."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only one promotion"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can be active for the same SKU at any given time."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SKU-level daily inventory limits"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"per-order purchase limits"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are supported."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2ClientCredentials","scopes":[],"type":"oauth2","description":"OAuth 2.0 client credentials used by partner applications.","flows":{"clientCredentials":{"tokenUrl":"https://api-docs.mykeeta.com/apis/yhsu3hu21ch23yabx4xuuuq7/basic/endpoints/generateaccesstoken","scopes":{}}}},{"name":"Signature","scopes":[],"type":"apiKey","in":"header","paramName":"Signature","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To enhance overall security, Keeta requires a signature in the Header when making requests to Keeta. Please refer to "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://api-docs.mykeeta.com/apis/yhsu3hu21ch23yabx4xuuuq7/docs/auth"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authorization Guide"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for details."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"chainId","in":"path","schemaId":"schema_136","description":"Unique identifier of the chain.","required":true}],"pointer":"/paths/~1v1~1promotion~1chains~1{chainId}/put/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/PromotionRequest","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"]}},"schemaId":"components/schemas/PromotionRequest","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"],"pointer":"/paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/v1/promotion/chains/{chainId}","servers":[{"url":"https://open.mykeeta.com/api/open/grocery"}],"parameters":{"path":[{"name":"chainId","in":"path","required":true,"example":"5508400","schemaId":"schema_136"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2ClientCredentials","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api-docs.mykeeta.com/apis/yhsu3hu21ch23yabx4xuuuq7/basic/endpoints/generateaccesstoken","scopes":{}}}},{"id":"Signature","type":"apiKey","name":"Signature","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/PromotionRequest","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"]}},"responseCodes":["202","400","401","403","429","500"],"pointer":"/v1/promotion/chains/{chainId}","href":"other/managepromotion","openApiOperationId":"managePromotion","summary":"Manage Promotion"},"definitionSamples":[{"lang":"cURL","source":"curl -i -X PUT \\\n  'https://open.mykeeta.com/api/open/grocery/v1/promotion/chains/{chainId}' \\\n  -H 'Authorization: Bearer <YOUR_TOKE_HERE>' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Signature: YOUR_API_KEY_HERE' \\\n  -d '{\n        \"vendors\": [\"12345\", \"67890\"],\n        \"type\": \"STRIKETHROUGH\",\n        \"promotionName\": \"Energy drinks 0.5l on sale\",\n        \"conditions\": {\n          \"startTime\": \"2024-03-05T15:59:59Z\",\n          \"endTime\": \"2024-03-05T16:59:59Z\"\n        },\n        \"discount\": [\n          {\n            \"discountSubtype\": \"PERCENTAGE\",\n            \"discountValue\": 10,\n            \"sku\": [\n              {\"skuId\": \"23927\", \"originalPrice\": 100},\n              {\"skuId\": \"84665\"}\n            ],\n            \"active\": true,\n            \"orderLimit\": 2,\n            \"dailyLimit\": 100\n          }\n        ]\n      }'"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://open.mykeeta.com/api/open/grocery"}],"schemaId":"components/schemas/PromotionRequest","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/PromotionRequest","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"The asynchronous promotion job for the specified vendors was created successfully.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/JobSubmissionResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example"]}},"schemaId":"components/schemas/JobSubmissionResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example"]},{"code":"400","description":"The request parameters were invalid, missing, or malformed.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example"]},{"code":"401","description":"The request was not authenticated or the credentials were invalid.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken"]},{"code":"403","description":"The application signature was invalid.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example"]},{"code":"429","description":"Too many requests. The rate limit was exceeded.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example"]},{"code":"500","description":"An unexpected error occurred on the server.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example"]}},"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example"]}],"pointer":"/paths/~1v1~1promotion~1chains~1{chainId}/put/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"202","schemaId":"components/schemas/JobSubmissionResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/JobSubmissionResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example"]}}},{"code":"401","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken","paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken"]}}},{"code":"403","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example"]}}},{"code":"429","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example"]}}},{"code":"500","schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse","exampleIds":["paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/managepromotion"}],"panels":[]}]},"httpPath":"/v1/promotion/chains/{chainId}"}],"store":{"schemaStore":{"components/schemas/PromotionRequest":{"id":"components/schemas/PromotionRequest","kind":"json-schema","title":"PromotionRequest","data":{"type":"object","required":["vendors","type","discount"],"properties":{"vendors":{"type":"array","minItems":1,"items":{"type":"string"},"example":["12345","67890"],"description":"Identifiers of the vendors that participate in the promotion."},"type":{"type":"string","enum":["STRIKETHROUGH"],"example":"STRIKETHROUGH","description":"This field represents the promotion type. Only STRIKETHROUGH is currently supported."},"promotionName":{"type":"string","example":"Energy drinks 0.5l on sale","description":"Unique name used to identify and manage the promotion on the Keeta platform."},"conditions":{"$ref":"#/components/schemas/PromotionConditions"},"discount":{"type":"array","minItems":1,"maxItems":20000,"items":{"$ref":"#/components/schemas/DiscountItem"},"description":"A list of SKU-level discount configurations. A single request can contain up to 20,000 discount items."}}}},"components/schemas/PromotionConditions":{"id":"components/schemas/PromotionConditions","kind":"json-schema","title":"PromotionConditions","data":{"type":"object","description":"Optional promotion validity period. When this object is omitted, the promotion becomes effective after creation and remains effective until it is updated or deactivated. The start time and end time need to be either both provided or both omitted.","properties":{"startTime":{"type":"string","format":"date-time","example":"2024-09-20T09:23:06Z","description":"Optional promotion start time in UTC using ISO 8601 format. When both times are provided, this value must be earlier than endTime."},"endTime":{"type":"string","format":"date-time","example":"2024-09-22T09:23:06Z","description":"Optional promotion end time in UTC using ISO 8601 format. When both times are provided, this value must be later than startTime."}}}},"components/schemas/DiscountItem":{"id":"components/schemas/DiscountItem","kind":"json-schema","title":"DiscountItem","data":{"type":"object","required":["sku"],"properties":{"sku":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/PromotionSku"},"example":[{"skuId":"23927","originalPrice":100},{"skuId":"84665"}],"description":"List of SKU objects. The specified SKUs are added to the promotion when active is true and removed when active is false."},"active":{"type":"boolean","default":true,"example":true,"description":"Indicates whether the specified SKUs participate in the promotion. The default value is true."},"discountSubtype":{"type":"string","enum":["PERCENTAGE","FINAL_PRICE"],"example":"FINAL_PRICE","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This field represents the discount calculation method and is "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"required when active is true"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PERCENTAGE"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Specifies a percentage reduction."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"FINAL_PRICE"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Specifies the final selling price."},"children":[]}]}]}]}]},"discountValue":{"type":"number","format":"double","exclusiveMinimum":true,"minimum":0,"example":10.98,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This field represents the discount value and is "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"required when active is true"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PERCENTAGE"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Provide a value from 1 through 100 with no more than two decimal places. For example, 10 represents a 10 percent reduction."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"FINAL_PRICE"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Provide a positive amount in local currency with no more than three decimal places. For weighted products, should be sent for the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"base_weight"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]},"orderLimit":{"type":"integer","format":"int32","nullable":true,"minimum":0,"maximum":100000,"default":null,"example":2,"description":"Maximum number of times the promotion can be applied to each SKU in a single order. The accepted configuration range is 0 to 100000. Null means there is no limit."},"dailyLimit":{"type":"integer","format":"int32","nullable":true,"minimum":0,"maximum":100000,"default":null,"example":100,"description":"Maximum number of times the promotion can be applied to each SKU in one day. The accepted configuration range is 0 to 100000. Null means there is no limit."}}}},"components/schemas/PromotionSku":{"id":"components/schemas/PromotionSku","kind":"json-schema","title":"PromotionSku","data":{"type":"object","required":["skuId"],"properties":{"skuId":{"type":"string","example":"2756","description":"Unique identifier of the SKU."},"originalPrice":{"type":"number","format":"double","nullable":true,"example":99.43,"description":"Original product price in local currency. Up to two decimal places are supported."}}}},"components/schemas/JobSubmissionResponse":{"id":"components/schemas/JobSubmissionResponse","kind":"json-schema","title":"JobSubmissionResponse","data":{"type":"object","required":["jobId","jobStatus"],"properties":{"jobId":{"type":"string","example":"id_123456","description":"Job identifier. Can be used as a query parameter to get the job status"},"jobStatus":{"type":"string","enum":["QUEUED"],"example":"QUEUED","description":"Job status. Always equal to QUEUED due to the asynchronous nature of this endpoint."}}}},"components/schemas/PromotionJobResponse":{"id":"components/schemas/PromotionJobResponse","kind":"json-schema","title":"PromotionJobResponse","data":{"type":"object","required":["jobId","jobStatus","createdAt","updatedAt","result"],"properties":{"jobId":{"type":"string","example":"id_123456","description":"Job identifier. Can be used as a query parameter to get the job status"},"jobStatus":{"type":"string","enum":["QUEUED","INPROGRESS","COMPLETED","FAILED"],"example":"COMPLETED","description":"This field represents the current processing status of the job."},"createdAt":{"type":"string","format":"date-time","example":"2024-09-30T10:00:36Z","description":"Time when the job was created, in UTC using ISO 8601 format."},"updatedAt":{"type":"string","format":"date-time","example":"2024-09-30T10:05:36Z","description":"Time when the job status was last updated, in UTC using ISO 8601 format."},"result":{"$ref":"#/components/schemas/PromotionJobResult"}}}},"components/schemas/PromotionJobResult":{"id":"components/schemas/PromotionJobResult","kind":"json-schema","title":"PromotionJobResult","data":{"type":"object","description":"Detailed processing result for vendors and SKUs that could not be included in the promotion.","properties":{"invalidVendors":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of invalid vendor identifiers, including vendors that do not exist or do not belong to the specified chain."},"missingSkus":{"allOf":[{"$ref":"#/components/schemas/VendorSkuMap"}],"description":"Map whose key is a vendor identifier and whose value is a list of SKU identifiers that were not found in that vendor's catalog."},"invalidDiscountedSkus":{"allOf":[{"$ref":"#/components/schemas/VendorSkuMap"}],"description":"Map whose key is a vendor identifier and whose value is a list of SKU identifiers for which the discounted price is higher than the listed product price."},"invalidPromotionTime":{"allOf":[{"$ref":"#/components/schemas/VendorSkuMap"}],"description":"Map whose key is a vendor identifier and whose value is a list of SKU identifiers with an invalid promotion time."},"others":{"allOf":[{"$ref":"#/components/schemas/VendorSkuMap"}],"description":"Map whose key is a vendor identifier and whose value is a list of SKU identifiers that failed for other reasons."}}}},"components/schemas/VendorSkuMap":{"id":"components/schemas/VendorSkuMap","kind":"json-schema","title":"VendorSkuMap","data":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"11221":["2355662","1278976"]},"description":"Map whose key is a vendor identifier and whose value is a list of SKU identifiers that could not be processed for that vendor."}},"components/schemas/PromotionEventRequest":{"id":"components/schemas/PromotionEventRequest","kind":"json-schema","title":"PromotionEventRequest","data":{"type":"object","required":["jobId","jobStatus"],"properties":{"jobId":{"type":"string","example":"id_123456","description":"Job identifier from the response of the Manage Promotion API."},"jobStatus":{"type":"string","enum":["QUEUED","INPROGRESS","COMPLETED","FAILED"],"description":"Job status of the asynchronous promotion task.","example":"COMPLETED"},"downloadUrl":{"type":"string","format":"uri","example":"https://example.com/promotion-results.csv","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"URL of an Excel file containing the promotion execution result for each SKU. "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only when the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobStatus=COMPLETED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" then the downloadUrl is available."},"children":[]}]}]}]}]},"reason":{"type":"string","example":"The job failed to execute.","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The specific reason why the asynchronous promotion job failed. This field is available only when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobStatus=FAILED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}}}},"components/schemas/ErrorResponse":{"id":"components/schemas/ErrorResponse","kind":"json-schema","title":"ErrorResponse","data":{"type":"object","properties":{"code":{"type":"string","example":"BAD_REQUEST","description":"Machine-readable error title."},"message":{"type":"string","example":"Invalid Parameter format","description":"Human-readable explanation of the error."}}}},"components/schemas/CallbackErrorResponse":{"id":"components/schemas/CallbackErrorResponse","kind":"json-schema","title":"CallbackErrorResponse","data":{"type":"object","properties":{"code":{"type":"string","example":"Unexpected error","description":"Human-readable error title."},"message":{"type":"integer","format":"int32","example":500,"description":"Numeric error status supplied by the callback service."}}}},"schema_136":{"kind":"json-schema","data":{"type":"string","example":"5508400"},"id":"schema_136"}},"exampleStore":{"paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example":{"value":{"vendors":["12345","67890"],"type":"STRIKETHROUGH","promotionName":"Energy drinks 0.5l on sale","conditions":{"startTime":"2024-03-05T15:59:59Z","endTime":"2024-03-05T16:59:59Z"},"discount":[{"discountSubtype":"PERCENTAGE","discountValue":10,"sku":[{"skuId":"23927","originalPrice":100},{"skuId":"84665"}],"active":true,"orderLimit":2,"dailyLimit":100}]},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/requestBody/content/application~1json/example"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example":{"value":{"jobId":"id_123456","jobStatus":"QUEUED"},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/202/content/application~1json/example"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example":{"value":{"code":"BAD_REQUEST","message":"Invalid Parameter format"},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/400/content/application~1json/example"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader":{"value":{"code":"invalid_request","message":"Authorization header missing"},"key":"missingAuthorizationHeader","summary":"Authorization header is missing","id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/missingAuthorizationHeader"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken":{"value":{"code":"invalid_token","message":"Invalid access token or signature"},"key":"invalidToken","summary":"Access token or signature is invalid","id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/invalidToken"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken":{"value":{"code":"invalid_token","message":"The access token expired"},"key":"expiredToken","summary":"Access token has expired","id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/401/content/application~1json/examples/expiredToken"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example":{"value":{"code":"invalid_signature","message":"The signature is invalid"},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/403/content/application~1json/example"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests. Please try later"},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/429/content/application~1json/example"},"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example":{"value":{"code":"INTERNAL_ERROR","message":"Internal Server Error"},"id":"paths/~1v1~1promotion~1chains~1{chainId}/put/responses/500/content/application~1json/example"}},"securitySchemeStore":{"OAuth2ClientCredentials":{"id":"OAuth2ClientCredentials","type":"oauth2","description":"OAuth 2.0 client credentials used by partner applications.","flows":{"clientCredentials":{"tokenUrl":"https://api-docs.mykeeta.com/apis/yhsu3hu21ch23yabx4xuuuq7/basic/endpoints/generateaccesstoken","scopes":{}}}},"Signature":{"id":"Signature","type":"apiKey","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To enhance overall security, Keeta requires a signature in the Header when making requests to Keeta. Please refer to "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://api-docs.mykeeta.com/apis/yhsu3hu21ch23yabx4xuuuq7/docs/auth"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authorization Guide"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for details."},"children":[]}]}]}],"in":"header","paramName":"Signature"},"WebhookKeyAuth":{"id":"WebhookKeyAuth","type":"apiKey","description":"Optional static webhook token configured in the Developer Portal.","in":"header","paramName":"X-Webhook-Token"}},"servers":[{"url":"https://open.mykeeta.com/api/open/grocery"}]},"options":{"hideSidebar":true,"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/apis/@grocery/promotion.json?download"},{"url":"/_bundle/apis/@grocery/promotion.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Keeta Promotion API Reference","description":"This API provides comprehensive promotion management capabilities for Keeta platform integration, including promotion management, promotion status query and notification.\n"}},"baseSlug":"/apis/grocery/promotion","routesMapping":{}}