Discounts

Lists all discounts.

get
Authorizations
Header parameters
organization-idstringRequired

Organization ID

Responses
200Success
application/json
get
GET /v1/om/discounts HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Accept: */*
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "items": [
      {
        "locales": {
          "ar": {
            "name": "text",
            "description": "text"
          },
          "en": {
            "name": "text",
            "description": "text"
          }
        },
        "type": "fixed",
        "value": 1,
        "qualifications": [
          "line"
        ],
        "orderTypes": [
          "delivery"
        ],
        "max": 1,
        "isActive": true,
        "excludeTax": true,
        "reasonRequired": true,
        "commentRequired": true,
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text",
        "rules": [
          {
            "conditions": [
              {
                "key": "level",
                "operator": "contains",
                "value": "text"
              }
            ],
            "action": "exclude",
            "id": "text"
          }
        ]
      }
    ]
  }
}

Creates a new discount.

post
Authorizations
Header parameters
organization-idstringRequired

Organization ID

Body
Responses
200Success
application/json
post
POST /v1/om/discounts HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 309

{
  "params": {
    "locales": {
      "ar": {
        "name": "text",
        "description": "text"
      },
      "en": {
        "name": "text",
        "description": "text"
      }
    },
    "type": "fixed",
    "value": 1,
    "qualifications": [
      "line"
    ],
    "isActive": true,
    "orderTypes": [
      "delivery"
    ],
    "max": 1,
    "minTotal": 1,
    "withoutModifiers": true,
    "excludeTax": true,
    "reasonRequired": true,
    "commentRequired": true
  }
}
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "item": {
      "locales": {
        "ar": {
          "name": "text",
          "description": "text"
        },
        "en": {
          "name": "text",
          "description": "text"
        }
      },
      "type": "fixed",
      "value": 1,
      "qualifications": [
        "line"
      ],
      "orderTypes": [
        "delivery"
      ],
      "max": 1,
      "isActive": true,
      "excludeTax": true,
      "reasonRequired": true,
      "commentRequired": true,
      "createdAt": "text",
      "createdVia": "text",
      "createdBy": "text",
      "updatedAt": "text",
      "updatedVia": "text",
      "updatedBy": "text",
      "id": "text",
      "rules": [
        {
          "conditions": [
            {
              "key": "level",
              "operator": "contains",
              "value": "text"
            }
          ],
          "action": "exclude",
          "id": "text"
        }
      ]
    }
  }
}

Returns a discount.

get
Authorizations
Path parameters
uidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Responses
200Success
application/json
get
GET /v1/om/discounts/{uid} HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Accept: */*
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "items": [
      {
        "locales": {
          "ar": {
            "name": "text",
            "description": "text"
          },
          "en": {
            "name": "text",
            "description": "text"
          }
        },
        "type": "fixed",
        "value": 1,
        "qualifications": [
          "line"
        ],
        "orderTypes": [
          "delivery"
        ],
        "max": 1,
        "isActive": true,
        "excludeTax": true,
        "reasonRequired": true,
        "commentRequired": true,
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text",
        "rules": [
          {
            "conditions": [
              {
                "key": "level",
                "operator": "contains",
                "value": "text"
              }
            ],
            "action": "exclude",
            "id": "text"
          }
        ]
      }
    ]
  }
}

Updates a discount.

patch
Authorizations
Path parameters
uidstringRequired
Header parameters
organization-idstringRequired

Organization ID

Body
Responses
200Success
application/json
patch
PATCH /v1/om/discounts/{uid} HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 238

{
  "params": {
    "id": "text",
    "locales": {},
    "type": "fixed",
    "value": 1,
    "qualifications": [
      "line"
    ],
    "isActive": true,
    "orderTypes": [
      "delivery"
    ],
    "max": 1,
    "minTotal": 1,
    "withoutModifiers": true,
    "excludeTax": true,
    "reasonRequired": true,
    "commentRequired": true
  }
}
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "item": {
      "locales": {
        "ar": {
          "name": "text",
          "description": "text"
        },
        "en": {
          "name": "text",
          "description": "text"
        }
      },
      "type": "fixed",
      "value": 1,
      "qualifications": [
        "line"
      ],
      "orderTypes": [
        "delivery"
      ],
      "max": 1,
      "isActive": true,
      "excludeTax": true,
      "reasonRequired": true,
      "commentRequired": true,
      "createdAt": "text",
      "createdVia": "text",
      "createdBy": "text",
      "updatedAt": "text",
      "updatedVia": "text",
      "updatedBy": "text",
      "id": "text",
      "rules": [
        {
          "conditions": [
            {
              "key": "level",
              "operator": "contains",
              "value": "text"
            }
          ],
          "action": "exclude",
          "id": "text"
        }
      ]
    }
  }
}

Exports all orders with support for incremental fetching.

get
Authorizations
Query parameters
updatedSincestringOptional
offsetstringOptional
Header parameters
organization-idstringRequired

Organization ID

Responses
200Success
application/json
get
GET /v1/om/discounts/export HTTP/1.1
Host: 
api-key: YOUR_API_KEY
organization-id: text
Accept: */*
200Success
{
  "app": "text",
  "service": "text",
  "warnings": [
    {}
  ],
  "instanceId": "text",
  "requestId": "text",
  "data": {
    "items": [
      {
        "locales": {
          "ar": {
            "name": "text",
            "description": "text"
          },
          "en": {
            "name": "text",
            "description": "text"
          }
        },
        "type": "fixed",
        "value": 1,
        "qualifications": [
          "line"
        ],
        "orderTypes": [
          "delivery"
        ],
        "max": 1,
        "isActive": true,
        "excludeTax": true,
        "reasonRequired": true,
        "commentRequired": true,
        "createdAt": "text",
        "createdVia": "text",
        "createdBy": "text",
        "updatedAt": "text",
        "updatedVia": "text",
        "updatedBy": "text",
        "id": "text",
        "rules": [
          {
            "conditions": [
              {
                "key": "level",
                "operator": "contains",
                "value": "text"
              }
            ],
            "action": "exclude",
            "id": "text"
          }
        ]
      }
    ],
    "next": "text"
  }
}

Was this helpful?