Divendo API 2.0

We’ve rebuilt our API from the ground up to be easier than ever to integrate our platform with your favourite software

Retrieve all discount reasons

GET/store/discountreasons

Gets information about all discount reasons within your store configuration.

Querystring count The number of records to return
offset The number of records from a collection to skip

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "total": 12,
  "count": 3,
  "offset": 0,
  "results": [
    {
      "id": "5912a2549b04bf0fccf3fa49",
      "name": "Honour Previous Promotion"
    },
    {
      "id": "5912a2409b04bf0fccf3fa3a",
      "name": "Incorrect List Price"
    },
    {
      "id": "5912a2039b04bf0fccf3fa21",
      "name": "Managers Discretion"
    }
  ]
}

Lookup a specific discount reason

GET/store/discountreasons/{id}

Gets information about a specific discount reason within your store configuration.

Parameters id The unique id for the discount reason

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5912a2039b04bf0fccf3fa21",
  "name": "Managers Discretion"
}

Create a new discount reason

POST/store/discountreasons

Creates a new discount reason within your store configuration.

Request body Discount Reason

Example request

Content-Type: application/json; charset=utf-8

{
  "name": "Goodwill"
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5aba9bad9b04b409449aa0fb",
  "name": "Goodwill"
}

Update a discount reason

PUT/store/discountreasons/{id}

Updates the settings for a specific discount reason.

Parameters id The unique id for the discount reason
Request body Discount Reason

Example request

Content-Type: application/json; charset=utf-8

{
  "name": "Goodwill Gesture"
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5aba9bad9b04b409449aa0fb",
  "name": "Goodwill Gesture"
}

Delete a discount reason

DELETE/store/discountreasons/{id}

Deletes a discount reason from your store configuration.

Parameters id The unique id for the discount reason

Example response

HTTP/1.1 204 No Content
Content-Type: application/json; charset=utf-8