Discounts

Lists all discounts.

get
Responses
200Success
application/json
get
GET /v1/om/discounts HTTP/1.1
Host: 
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": 1,
        "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": 1,
                "operator": "contains",
                "value": "text"
              }
            ],
            "action": 1,
            "id": "text"
          }
        ]
      }
    ]
  }
}

Creates a new discount.

post
Body
Responses
200Success
application/json
post
POST /v1/om/discounts HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 303

{
  "params": {
    "locales": {
      "ar": {
        "name": "text",
        "description": "text"
      },
      "en": {
        "name": "text",
        "description": "text"
      }
    },
    "type": 1,
    "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": 1,
      "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": 1,
              "operator": "contains",
              "value": "text"
            }
          ],
          "action": 1,
          "id": "text"
        }
      ]
    }
  }
}

Returns a discount.

get
Path parameters
idstringRequired
Responses
200Success
application/json
get
GET /v1/om/discounts/{id} HTTP/1.1
Host: 
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": 1,
        "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": 1,
                "operator": "contains",
                "value": "text"
              }
            ],
            "action": 1,
            "id": "text"
          }
        ]
      }
    ]
  }
}

Updates a discount.

patch
Path parameters
idstringRequired
Body
Responses
200Success
application/json
patch
PATCH /v1/om/discounts/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 232

{
  "params": {
    "id": "text",
    "locales": {},
    "type": 1,
    "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": 1,
      "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": 1,
              "operator": "contains",
              "value": "text"
            }
          ],
          "action": 1,
          "id": "text"
        }
      ]
    }
  }
}

Exports all orders with support for incremental fetching.

get
Path parameters
updatedSincestringRequired
offsetstringRequired
Responses
200Success
application/json
Responseobject
get
GET /v1/om/discounts/export HTTP/1.1
Host: 
Accept: */*
200Success
{}

Was this helpful?