Skip to main content
POST
/
pos
/
{posSystemId}
/
company
/
{posCompanyId}
/
import
/
promotions
Import promotions to the system
curl --request POST \
  --url https://public-api-demo.clearline.me/pos/{posSystemId}/company/{posCompanyId}/import/promotions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json-patch+json' \
  --data '
{
  "items": [
    {
      "id": "110",
      "name": "Promotion 110",
      "useForAllCategories": true,
      "useForAllProducts": true,
      "locationIds": [
        "295"
      ],
      "categoryIds": [
        "2"
      ],
      "promotionValidities": [
        {
          "startDate": "2023-12-19T13:18:44.512Z",
          "endDate": "2023-12-19T13:18:44.512Z",
          "recurrence": {
            "daysOfWeek": [
              "Sunday"
            ],
            "startDate": "2023-12-19T13:18:44.512Z",
            "endDate": "2023-12-19T13:18:44.512Z"
          }
        }
      ],
      "productIds": [
        "1"
      ],
      "promotionResults": [
        {
          "promotionType": "Amount",
          "value": 10
        }
      ]
    }
  ]
}
'
{
  "data": {
    "status": "<string>",
    "createdCount": 123,
    "updatedCount": 123,
    "errors": [
      {
        "entityId": "<string>",
        "rowNumber": 123,
        "errorMessage": "<string>",
        "errorDetails": "<string>"
      }
    ],
    "warnings": [
      {
        "entityId": "<string>",
        "rowNumber": 123,
        "message": "<string>",
        "details": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Path Parameters

posSystemId
string
required
posCompanyId
string
required

Body

Represents promotions items import category request for POS

items
object[] | null

Items to add

Response

Success

data
object

Results of import