Only this pageAll pages
Powered by GitBook
1 of 18

chainbox.io

Loading...

WSM

Loading...

API

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

SSO

Loading...

WSM API

Products /product

Max, Updates, Softdeletes, Harddeletes

Category /productcategory

Max, Updates, Softdeletes, Harddeletes

Order /order

Get customer orders, Get order

Order /orderdocument

Get customer orderdocuments, Get orderdocument

Lookup List Items /lookuplistitems

Max, Updates, Softdeletes, Harddeletes

Vouchers /voucher

Max, Updates, Softdeletes, Harddeletes Get status, Update status

Order

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch total items by sending a request with limit set to 0.

  2. Page though the results with limit and offset.

Get customer orders

URL : /:organizationid/:wsmid/api/v1/order/customer/:customer

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

customer=[string] is the ID of the customer.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

(optional) offset=[int] number of items to skip. Default = 0.

(optional) keyword=[string] search for part of an ID or lines if applyKeywordToLines is set to true.

(optional) applyKeywordToLines=[boolean] extend search with part of productname on lines.

(optional) orderby=[string] order results by field. One of: orderdate (default), deliverydate

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
	"total": 1,
	"items": [
		{
			"head": {
				"id": "12345678",
				"salesRep": "",
				"customer": "12345678",
				"orderDate": "2021-11-03T00:00:00",
				"type": "Order",
				"deliveryDate": "1753-01-01T00:00:00",
				"shippingDate": "1753-01-01T00:00:00",
				"totalPrice": 1000.00,
				"vatAmount": 250.00,
				"currency": "DKK",
				"ourReference": "",
				"yourReference": "",
				"deliveryMethod": "",
				"paymentMethod": "",
				"invoiceName": "",
				"invoiceAddress": "",
				"invoiceAddress2": "",
				"invoiceCity": "",
				"invoiceZipCode": "",
				"invoiceCountry": "",
				"invoicePhone": "",
				"invoiceEmail": "",
				"deliveryName": "",
				"deliveryAddress": "",
				"deliveryAddress2": "",
				"deliveryCity": "",
				"deliveryZipCode": "",
				"deliveryCountry": "",
				"deliveryEmail": "",
				"comment": "",
				"extraFields": {
					"dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
				}
			},
			"lines": [
				{
					"lineNumber": 1,
					"totalPrice": 0.0,
					"discountPercentage": 0.0,
					"quantityToDeliver": 0.0,
					"quantityInvoiced": 0.0,
					"unitPrice": 0.0,
					"orderId": "12345678",
					"text": "",
					"product": "",
					"variant": "",
					"unit": "",
					"quantityOrdered": 0.0,
					"quantityDelivered": 0.0,
					"extraFields": {
            "dynamicfield-1": "value1",
            "dynamicfield-2": "value2",
            "dynamicfield-2": 0
					}
				}
			]
		}
	]
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Get order

URL : /:organizationid/:wsmid/api/v1/order/:orderid

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

orderid=[string] is the ID of the order.

documentid=[string] is the ID of the document.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
	"total": 1,
	"items": [
		{
			"head": {
				"id": "12345678",
				"salesRep": "",
				"customer": "12345678",
				"orderDate": "2021-11-03T00:00:00",
				"type": "Order",
				"deliveryDate": "1753-01-01T00:00:00",
				"shippingDate": "1753-01-01T00:00:00",
				"totalPrice": 1000.00,
				"vatAmount": 250.00,
				"currency": "DKK",
				"ourReference": "",
				"yourReference": "",
				"deliveryMethod": "",
				"paymentMethod": "",
				"invoiceName": "",
				"invoiceAddress": "",
				"invoiceAddress2": "",
				"invoiceCity": "",
				"invoiceZipCode": "",
				"invoiceCountry": "",
				"invoicePhone": "",
				"invoiceEmail": "",
				"deliveryName": "",
				"deliveryAddress": "",
				"deliveryAddress2": "",
				"deliveryCity": "",
				"deliveryZipCode": "",
				"deliveryCountry": "",
				"deliveryEmail": "",
				"comment": "",
				"extraFields": {
					"dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
				}
			},
			"lines": [
				{
					"lineNumber": 1,
					"totalPrice": 0.0,
					"discountPercentage": 0.0,
					"quantityToDeliver": 0.0,
					"quantityInvoiced": 0.0,
					"unitPrice": 0.0,
					"orderId": "12345678",
					"text": "",
					"product": "",
					"variant": "",
					"unit": "",
					"quantityOrdered": 0.0,
					"quantityDelivered": 0.0,
					"extraFields": {
            "dynamicfield-1": "value1",
            "dynamicfield-2": "value2",
            "dynamicfield-2": 0
					}
				}
			]
		}
	]
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Order ID missing. Code: 404 NOT FOUND

Resources

Resources knappen repræsenterer dine muligheder for at ligge produktbilleder ind til din webshop, når du trykker her så kommer du frem til et nyt vindue hvor det er muligt at uploade billeder til din side.

Navngiv altid dine billeder det samme som produktets varenr. Hvis du har flere billeder til det samme produkt, så navngiv dem med et løbenr. efter navnet. Det billede uden nummer, eller det med det første nummer bliver automatisk det forreste billede og dermed det billeder der kommer ud på produktkortet.

Videoen viser en oversigt over de billeder der findes, du kan se de forskellige "buckets" der indeholder billedernem, og du kan uploade flere på "upload files" knappen. Her kan du enten trykke på upload for at vælge en mappe struktur hvori dine billeder ligger, eller du kan trække dem ind fra en anden mappe. Her kan du også skrive navnet på den bucket du ønsker at bruge, eller oprette en ny, og du kan give et billedet et tag til fremtidig reference.

Buckets kan med fordel bruges til at differentiere imellem billederne og deres brugssituation. F.eks. produktbilleder, evt. i flere lag, eller sliders, content mm.

Resources

Upload resource

URL : /:organizationid/:pimid/api/v0.1/resource

or

URL : /:organizationid/:pimid/api/v0.1/productresource

Using the productresource-URL will start a generation of product-variants after upload. Using the generic resource-URL product/category variants are only generated once the resource is related to a product or category.

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: multipart/form-data; boundary=----xxx

Request body:

FIle-upload with name file

------xxx
Content-Disposition: form-data; name="file"; filename="image.jpg"
Content-Type: image/jpeg

Response body

{ id = "b6b4bb0b-6fb3-4dc9-a2f9-34e333e7d4f4"}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Delete Resource

URL : /:organizationid/:pimid/api/v0.1/resource/:resourceid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

resourceid=[string] is the ID of the Resource to be deleted.

Method: DELETE

Auth required: YES

Authorization required: write

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Download Resource

URL : /:organizationid/:pimid/api/v0.1/resource/:resourceid/download?variant=default

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

resourceid=[string] is the ID of the Resource to be deleted.

variant=[string] is the variant-identifier to be downloaded. Leaving the parameter out, will download the original file.

Method: GET

Auth required: YES

Authorization required: read

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Relate resource to product

URL : /:organizationid/:pimid/api/v0.1/productresource/:resourceid/relate

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

resourceid=[string] is the ID of the Resource to be deleted.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request body:

{ "productid" = "123" }

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

UnRelate resource from product

URL : /:organizationid/:pimid/api/v0.1/productresource/:resourceid/unrelate

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

resourceid=[string] is the ID of the Resource to be deleted.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request body:

{ "productid" = "123" }

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

admin.chainbox.dk

Welcome to admin.chainbox.dk - your control panel for managing users and access.

Users

The first section you land on is the user list displaying any active users.

Creating new users

New users can be created using the "Create user" button in the header of the user section. This will open a modal window prompting for the user name and e-mail. Choosing "Save" will create the new user and open the user details panel.

This will issue an e-mail to the user with a welcome message and a link to a page where they can select a password.

User details

The user details panel contains two tabbed sections: "Access" and "Info".

User access

The access section allows for selecting which applications the user has access to, by toggling the on/off switch for each app. User access is granted/revoked immediately.

User info

The info section has options for changing the user name and managing which divisions and roles the user is assigned (see below for more on division and roles). Furthermore this is where users can be blocked, deleted and issued a password reset.

Blocking users

Users can be blocked, temporarily taking away their access to any applications. Users can be unblocked at a later stage.

Deleting users

Deleting a user removes it completely and any access is revoked. This operation cannot be undone.

Password reset

Issuing a password reset will revoke any active sessions, remove the user password, remove any registered multifactor authentication on the user and send a user an e-mail with instructions on creating a new password.

Settings

The settings section contains your general information on record, options for managing user roles and divisions, as well as the option to enfore multifactor authentication for your users.

Require user MFA

Enabling this option will require your users to enable multi factor authentication for their Chainbox login. They will be prompted to do so when accessing their dashboard or any of their apps.

Divisions

It can sometimes be helpful to categorise staff into groups based on some property of the organisation. Divisions are just that. A division can describe a physical location, brand, branch or franchise. They are essentially just tags on the users to make it easier to navigate the user list.

Existing divisions are displayed in the list and a new division can be created using the button labeled "Create division". This will launch a modal window prompting for a label and an optional description.

Selecting "Create" will create the division after which it is displayed in the list.

Editing existing divisions can be done via the pen-icon next to each division in the list. This launches a modal with options to change the label and description.

Assigning users to divisions is done through the user list, activating the user details panel for a specific user. From here select the "Info" tab and select the checkbox next to the division.

Roles

User roles, like divisions, categorise the users with tags. These are different from divisions in that they can be used for fine-grained access management in your applications, i.e. the Customer application. A user role is typically a job title or a label describing a function but can be any string of text.

Existing roles are displayed in the list and a new user role can be created using the button labeled "Create role". This will launch a modal window prompting for a label and an optional description.

Selecting "Create" will create the role after which it is displayed in the list.

Editing existing roles can be done via the pen-icon next to each role in the list. This launches a modal with options to change the label and description.

Assigning users to roles is done through the user list, activating the user details panel for ea specific user. From here select the "Info" tab and select the checkbox next to the role.

Filters

When users are assigned to divisions or roles the user list can be filtered by these along the always active text search filter.

Assigned divisions and roles are also displayed next to each user in the list.

User list
Create user modal
Welcome e-mail
User details access panel
User details access panel with enabled access
User details info panel
Block user dialog
Delete user dialog
Reset password dialog
Settings section
Divisions & roles - empty list
Create division modal
Divisions & roles - list items
Edit division modal
User details panel with division selection
Divisions & roles - empty list
Create role modal
Divisions & roles - list items
Edit role modal
User details panel with role selection

OrderDocument

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch total items by sending a request with limit set to 0.

  2. Page though the results with limit and offset.

Get customer orderdocuments

URL : /:organizationid/:wsmid/api/v1/orderdocument/customer/:customer

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

customer=[string] is the ID of the customer.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) type=[string] returns items of the document type.

?> Possible document types are: Invoice, PackingSlip, Unknown, ProformaInvoice, Confirmation, Offer, Custom, CreditMemo

(optional) limit=[int] number of items returned. Default = 1000.

(optional) offset=[int] number of items to skip. Default = 0.

(optional) keyword=[string] search for part of an ID or lines if applyKeywordToLines is set to true.

(optional) applyKeywordToLines=[boolean] extend search with part of productname on lines.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "total": 4,
  "items": [
    {
      "header": {
        "comment": "",
        "contact": "",
        "currency": "DKK",
        "customer": "12345678",
        "deliveryAddress": "",
        "deliveryAddress2": "",
        "deliveryCity": "",
        "deliveryCountry": "",
        "deliveryEmail": "",
        "deliveryMethod": "",
        "deliveryName": "",
        "deliveryRegion": "",
        "deliveryZipCode": "",
        "discountAmount": 0.0,
        "discountGroup": "",
        "documentDate": "2021-09-20T00:00:00",
        "documentId": "",
        "documentType": "Invoice",
        "dutyAmountTaxable": 0.0,
        "dutyAmountTaxfree": 0.0,
        "extraFields": {
          "dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
        },
        "feeAmountTaxable": 0.0,
        "feeAmountTaxfree": 0.0,
        "group": "",
        "id": "12345678",
        "invoiceAddress": "",
        "invoiceAddress2": "",
        "invoiceCity": "",
        "invoiceCountry": "",
        "invoiceCustomer": "12345678",
        "invoiceEmail": "",
        "invoiceName": "",
        "invoicePhone": "",
        "invoiceRegion": "",
        "invoiceZipCode": "",
        "orderDate": "2021-12-01T00:00:00",
        "ourReference": "CQP",
        "paymentMethod": "",
        "priceGroup": "1",
        "relatedOrder": "",
        "salesRep": "CQP",
        "shippingDate": "2021-12-01T00:00:00",
        "status": "Archived",
        "totalPrice": 1000.0,
        "type": "Order",
        "vatAmount": 0.0
      },
      "id": "12345678",
      "lines": [
        {
          "discountPercentage": 0.0,
          "extraFields": {
            "dynamicfield-1": "value1",
            "dynamicfield-2": "value2",
            "dynamicfield-2": 0
          },
          "lineNumber": 10000,
          "orderId": "12345678",
          "product": "12345678",
          "quantityDelivered": 1.0,
          "quantityInvoiced": 1.0,
          "quantityOrdered": 1.0,
          "quantityToDeliver": 1.0,
          "text": "",
          "totalPrice": 1000.0,
          "unit": "STK",
          "unitPrice": 1000.0,
          "variant": ""
        }
      ],
      "offsetId": "1",
      "postingDate": "2021-12-01T00:00:00",
      "type": "Invoice"
    }
  ]
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Get orderdocument

URL : /:organizationid/:wsmid/api/v1/orderdocument/:orderid/:documentid

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

orderid=[string] is the ID of the order.

documentid=[string] is the ID of the document.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "total": 1,
  "items": [
    {
      "header": {
        "comment": "",
        "contact": "",
        "currency": "DKK",
        "customer": "12345678",
        "deliveryAddress": "",
        "deliveryAddress2": "",
        "deliveryCity": "",
        "deliveryCountry": "",
        "deliveryEmail": "",
        "deliveryMethod": "",
        "deliveryName": "",
        "deliveryRegion": "",
        "deliveryZipCode": "",
        "discountAmount": 0.0,
        "discountGroup": "",
        "documentDate": "2021-09-20T00:00:00",
        "documentId": "",
        "documentType": "Invoice",
        "dutyAmountTaxable": 0.0,
        "dutyAmountTaxfree": 0.0,
        "extraFields": {
          "dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
        },
        "feeAmountTaxable": 0.0,
        "feeAmountTaxfree": 0.0,
        "group": "",
        "id": "12345678",
        "invoiceAddress": "",
        "invoiceAddress2": "",
        "invoiceCity": "",
        "invoiceCountry": "",
        "invoiceCustomer": "12345678",
        "invoiceEmail": "",
        "invoiceName": "",
        "invoicePhone": "",
        "invoiceRegion": "",
        "invoiceZipCode": "",
        "orderDate": "2021-12-01T00:00:00",
        "ourReference": "CQP",
        "paymentMethod": "",
        "priceGroup": "1",
        "relatedOrder": "",
        "salesRep": "CQP",
        "shippingDate": "2021-12-01T00:00:00",
        "status": "Archived",
        "totalPrice": 1000.0,
        "type": "Order",
        "vatAmount": 0.0
      },
      "id": "12345678",
      "lines": [
        {
          "discountPercentage": 0.0,
          "extraFields": {
            "dynamicfield-1": "value1",
            "dynamicfield-2": "value2",
            "dynamicfield-2": 0
          },
          "lineNumber": 10000,
          "orderId": "12345678",
          "product": "12345678",
          "quantityDelivered": 1.0,
          "quantityInvoiced": 1.0,
          "quantityOrdered": 1.0,
          "quantityToDeliver": 1.0,
          "text": "",
          "totalPrice": 1000.0,
          "unit": "STK",
          "unitPrice": 1000.0,
          "variant": ""
        }
      ],
      "offsetId": "1",
      "postingDate": "2021-12-01T00:00:00",
      "type": "Invoice"
    }
  ]
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Order ID and Document ID missing. Code: 404 NOT FOUND

Member

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch locally stored lastReplicationTimestamp if applicaple

  2. Call max endpoint and store MaxTimestamp.

  3. Call updates endpoint with parameters: from = lastReplicationTimestamp, to = MaxTimestamp (and lastoffsetid = nextoffsetid from previous batch)

  4. Call softdeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  5. Call harddeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  6. Save the stored value from step 2 (MaxTimestamp) as the new lastReplicationTimestamp

Max

This returns the max timestamp for a specific entity in order to know if there are relevant changes.

?> It is possible the reported max timestamp is irrelevant for the client/consumer (i.e. when using a filter with the related endpoints), in which case it would simply trigger an update routine with no changes.

URL : /:organizationid/:wsmid/api/v1/member/max

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "offset": "2021-12-01T08:20:16.421Z"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Updates

URL : /:organizationid/:wsmid/api/v1/member/:service/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2021-10-21T12:36:37.167Z",
      "createdBy": "System",
      "data": {
        "accountnumber": "1234",
        "email": "[email protected]"
      },
      "id": "12345678",
      "lastupdated": "2018-11-04T12:22:56.915Z",
      "type": "pim-products"
    }
  ],
  "nextoffsetid": "12345678"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Soft deletes

Soft deletes are documents from the same collection not matching the service filter. If there is no active filter (e.g. using the "default" service) - an empty result will be returned.

URL : /:organizationid/:wsmid/api/v1/member/:service/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "100-01",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    },
    {
      "id": "100-02",
      "lastUpdated": "2021-05-05T08:52:41.7Z"
    }
  ],
  "nextoffsetid": "100-02"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Hard deletes

Hard deletes are documents no longer in the collection.

?> It is possible the returned items are irrelevant for the client/consumer (i.e. when using a filter with the related endpoints). Match with existing IDs when appropriate.

URL : /:organizationid/:wsmid/api/v1/member/harddeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

?> Note that documentid and item id do not match. Only supply values provided by the endpoint though nextoffsetid.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "100-03",
      "lastUpdated": "2021-12-06T09:40:08.499Z"
    }
  ],
  "nextoffsetid": "61adda78880433063295a467"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Patch Single Address

URL : /:organizationid/:wsmid/api/v0.1/member/:memberid/address

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

memberid=[string] is the ID of the Member which address is to be updated.

Method: PATCH

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request body:

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

If no address exists, it is created with empty fields (except the ones included in payload).

Request example

{
    "address": "Test2",
    "address2": "Test line 2",
    "zipcode": "1210",
    "city": "København K",
    "country": "Denmark"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid member. Code: 404 NOT FOUND

Condition: The member was probably modified by another application underway. Try again Code: 409 CONFLICT

Patch Single Member

URL : /:organizationid/:wsmid/api/v0.1/member/:memberid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

memberid=[string] is the ID of the Member which address is to be updated.

Method: PATCH

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request body:

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

Request example

{
    "accountnumber": "123",
    "email": "[email protected]",
    "contactname": "Test Eksemplesen"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid member. Code: 404 NOT FOUND

Condition: The member was probably modified by another application underway. Try again Code: 409 CONFLICT

Create new member

URL : /:organizationid/:wsmid/api/v0.1/member

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request example

{
    "accountnumber": "123",
    "email": "[email protected]",
    "channels": ["b2c"],
    "elevel": 2,
    "contactname": "Users name",
    "passwordhash": "$2a$05$9wrsYWxxx",
    "extrafields": {
        "testsection": {
            "testprop": "test",
            "booltest": true
        }
    }
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: The member email has a conflict with another member Code: 409 CONFLICT

Category

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch locally stored lastReplicationTimestamp if applicaple

  2. Call max endpoint and store MaxTimestamp.

  3. Call updates endpoint with parameters: from = lastReplicationTimestamp, to = MaxTimestamp (and lastoffsetid = nextoffsetid from previous batch)

  4. Call softdeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  5. Call harddeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  6. Save the stored value from step 2 (MaxTimestamp) as the new lastReplicationTimestamp

Max

This returns the max timestamp for a specific entity in order to know if there are relevant changes.

?> It is possible the reported max timestamp is irrelevant for the client/consumer (i.e. when using a filter with the related endpoints), in which case it would simply trigger an update routine with no changes.

URL : /:organizationid/:wsmid/api/v1/productcategory/max

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "offset": "2021-12-01T08:20:16.421Z"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Updates

URL : /:organizationid/:wsmid/api/v1/productcategory/:service/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2020-10-20T12:06:58.857Z",
      "createdBy": "System",
      "data": {
        "parent": null,
        "color": "#cc99ff",
        "icon": "products_s",
        "label": "Product catalogue",
        "code": "root_root",
        "attributedata": {
          "sortorder": 100,
          "filter-fields": [
            "data.attributedata.stock-value",
            "data.attributedata.unit"
          ]
        },
        "localized_attributedata": {
          "da-DK": {
            "name": "Varekatalog"
          }
        },
        "resources": []
      },
      "id": "root_root",
      "lastUpdated": "2021-04-26T11:15:19.576Z",
      "type": "pim-product-categories"
    }
  ],
  "nextoffsetid": "root_root"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Soft deletes

Soft deletes are documents from the same collection not matching the service filter. If there is no active filter (e.g. using the "default" service) - an empty result will be returned.

URL : /:organizationid/:wsmid/api/v1/productcategory/:service/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "root_01",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    },
    {
      "id": "root_02",
      "lastUpdated": "2021-05-05T08:52:41.7Z"
    }
  ],
  "nextoffsetid": "root_02"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Hard deletes

Hard deletes are documents no longer in the collection.

?> It is possible the returned items are irrelevant for the client/consumer (i.e. when using a filter with the related endpoints). Match with existing IDs when appropriate.

URL : /:organizationid/:wsmid/api/v1/productcategory/harddeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

?> Note that documentid and item id do not match. Only supply values provided by the endpoint though nextoffsetid.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "root_test",
      "lastUpdated": "2021-12-06T09:40:08.499Z"
    }
  ],
  "nextoffsetid": "61adda78880433063295a467"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Product

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch locally stored lastReplicationTimestamp if applicaple

  2. Call max endpoint and store MaxTimestamp.

  3. Call updates endpoint with parameters: from = lastReplicationTimestamp, to = MaxTimestamp (and lastoffsetid = nextoffsetid from previous batch)

  4. Call softdeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  5. Call harddeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  6. Save the stored value from step 2 (MaxTimestamp) as the new lastReplicationTimestamp

Max

This returns the max timestamp for a specific entity in order to know if there are relevant changes.

?> It is possible the reported max timestamp is irrelevant for the client/consumer (i.e. when using a filter with the related endpoints), in which case it would simply trigger an update routine with no changes.

URL : /:organizationid/:wsmid/api/v1/product/max

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "offset": "2021-12-01T08:20:16.421Z"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Updates

URL : /:organizationid/:wsmid/api/v1/product/:service/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2021-10-21T12:36:37.167Z",
      "createdBy": "System",
      "data": {
        "revisionId": "fda8e58f-ab69-46e8-9fbe-ba5d9226f719",
        "sku": "12345678",
        "name": " ",
        "datasource": "erp",
        "attributedata": {
          "dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
        }
      },
      "channels": ["webshop"],
      "id": "12345678",
      "lastupdated": "2018-11-04T12:22:56.915Z",
      "type": "pim-products"
    }
  ],
  "nextoffsetid": "12345678"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Soft deletes

Soft deletes are documents from the same collection not matching the service filter. If there is no active filter (e.g. using the "default" service) - an empty result will be returned.

URL : /:organizationid/:wsmid/api/v1/product/:service/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "100-01",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    },
    {
      "id": "100-02",
      "lastUpdated": "2021-05-05T08:52:41.7Z"
    }
  ],
  "nextoffsetid": "100-02"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Hard deletes

Hard deletes are documents no longer in the collection.

?> It is possible the returned items are irrelevant for the client/consumer (i.e. when using a filter with the related endpoints). Match with existing IDs when appropriate.

URL : /:organizationid/:wsmid/api/v1/product/harddeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

?> Note that documentid and item id do not match. Only supply values provided by the endpoint though nextoffsetid.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "100-03",
      "lastUpdated": "2021-12-06T09:40:08.499Z"
    }
  ],
  "nextoffsetid": "61adda78880433063295a467"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Built-in Channel filters

In order to avoid creating service endpoints for typical use cases, a built-in channel filter is available via the following endpoints.

Updates by channel

URL : /:organizationid/:wsmid/api/v1/productbychannel/:channel/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

channel=[string] is the name of the channel on which to filter.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2021-10-21T12:36:37.167Z",
      "createdBy": "System",
      "data": {
        "revisionId": "fda8e58f-ab69-46e8-9fbe-ba5d9226f719",
        "sku": "12345678",
        "name": " ",
        "datasource": "erp",
        "attributedata": {
          "dynamicfield-1": "value1",
          "dynamicfield-2": "value2",
          "dynamicfield-2": 0
        }
      },
      "channels": ["webshop"],
      "id": "12345678",
      "lastupdated": "2018-11-04T12:22:56.915Z",
      "type": "pim-products"
    }
  ],
  "nextoffsetid": 12345678
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Soft deletes by channel

URL : /:organizationid/:wsmid/api/v1/productbychannel/:channel/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

channel=[string] is the name of the channel on which to filter.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "100-01",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    },
    {
      "id": "100-02",
      "lastUpdated": "2021-05-05T08:52:41.7Z"
    }
  ],
  "nextoffsetid": "100-02"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

PIM API

Products

Get or modify existing products

Lookup List Item

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch locally stored lastReplicationTimestamp if applicaple

  2. Call max endpoint and store MaxTimestamp.

  3. Call updates endpoint with parameters: from = lastReplicationTimestamp, to = MaxTimestamp (and lastoffsetid = nextoffsetid from previous batch)

  4. Call softdeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  5. Call harddeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  6. Save the stored value from step 2 (MaxTimestamp) as the new lastReplicationTimestamp

Max

This returns the max timestamp for a specific entity in order to know if there are relevant changes.

?> It is possible the reported max timestamp is irrelevant for the client/consumer (i.e. when using a filter with the related endpoints), in which case it would simply trigger an update routine with no changes.

URL : /:organizationid/:wsmid/api/v1/lookuplistitem/max

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "offset": "2021-12-01T08:20:16.421Z"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Updates

URL : /:organizationid/:wsmid/api/v1/lookuplistitem/:service/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2021-08-06T14:53:14.961Z",
      "createdBy": "John Doe",
      "data": {
        "code": "xxl",
        "label": "XXL",
        "sortorder": 108,
        "lookuplist": "size",
        "fields": {},
        "identifier": "size_xxl"
      },
      "id": "size_xxl",
      "lastUpdated": "2021-08-06T14:53:14.961Z",
      "type": "pim-lookup-list-items"
    }
  ],
  "nextoffsetid": "size_xxl"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Soft deletes

Soft deletes are documents from the same collection not matching the service filter. If there is no active filter (e.g. using the "default" service) - an empty result will be returned.

URL : /:organizationid/:wsmid/api/v1/lookuplistitem/:service/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "size_m",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    },
    {
      "id": "size_s",
      "lastUpdated": "2021-05-05T08:52:41.7Z"
    }
  ],
  "nextoffsetid": "size_s"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Hard deletes

Hard deletes are documents no longer in the collection.

?> It is possible the returned items are irrelevant for the client/consumer (i.e. when using a filter with the related endpoints). Match with existing IDs when appropriate.

URL : /:organizationid/:wsmid/api/v1/lookuplistitem/harddeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

?> Note that documentid and item id do not match. Only supply values provided by the endpoint though nextoffsetid.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "size_l",
      "lastUpdated": "2021-12-06T09:40:08.499Z"
    }
  ],
  "nextoffsetid": "61adda78880433063295a467"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Category

Get Single

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/category/:categoryid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

categoryid=[string] is the ID of the Product to be updated.

Method: GET

Auth required: YES

Authorization required: read

Response headers:

Last-Modified: Timestamp when the product was last modified

Response body example


{
  "parent": "root_12000",
  "label": "ROAD / RACE",
  "localized_attributedata": {
    "da-DK": {
      "name": "ROAD / RACE"
    }
  },
  "resources": [
    {
      "id": "0ba96650-ecc1-461c-b440-de1ae13f9362",
      "type": "image",
      "primary": true,
      "variants": [
        {
          "identifier": "categorydefault"
        },
        {
          "identifier": "categorysmall"
        }
      ]
    }
  ]
}

Get Multiple

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/categories

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: read

Request example

['root_12200', 'root_12120']

Response example

Success Response

Code: 200 OK

{
  "root_12120": {
    "parent": "root_12100",
    "label": "27,5",
    "localized_attributedata": {
      "da-DK": {
        "name": "27,5\""
      }
    },
    "resources": [
      {
        "id": "7d82539e-a80d-4fcf-b8ae-250535282a74",
        "type": "image",
        "primary": true,
        "variants": [
          {
            "identifier": "categorydefault"
          },
          {
            "identifier": "categorysmall"
          }
        ]
      }
    ]
  },
  "root_12200": {
    "parent": "root_12000",
    "label": "ROAD / RACE",
    "localized_attributedata": {
      "da-DK": {
        "name": "ROAD / RACE"
      }
    },
    "resources": [
      {
        "id": "0ba96650-ecc1-461c-b440-de1ae13f9362",
        "type": "image",
        "primary": true,
        "variants": [
          {
            "identifier": "categorydefault"
          },
          {
            "identifier": "categorysmall"
          }
        ]
      }
    ]
  }
}

Patch Single

URL : /:organizationid/:pimid/api/v0.1/category/:categoryid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

categoryid=[string] is the ID of the Product to be updated.

Method: PATCH

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

Only attributedata attributes can be modified.

Request example

{
        "attributedata": {
            "type": "fall-lines"
        },
        "localized_attributedata": { "da-DK": { "name": "FALL LINE 30,9x350" } },
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Create new category

URL : /:organizationid/:pimappid/api/v0.1/category

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimappid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request example

{
    "code": "root_123",
    "parent": "root_root",
    "label": "Taken"
    "attributedata": {
        "testsection": "testvalue"
    },
     "localized_attributedata": { "da-DK": { "name": "FALL LINE 30,9x350" } },
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: The member email has a conflict with another member Code: 409 CONFLICT

Product

Get Single

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/product/:productid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: GET

Auth required: YES

Authorization required: read

Response headers:

Last-Modified: Timestamp when the product was last modified

Response body example

{
  "name": "Bike Attitude - Kædelås",
  "channels": ['webshop'],
  "attributedata": {
    "unit": "STK",
    "group": "12345",
    "ean": "57012121212",
    "weight": 770.0,
    "height": 7.5,
    "width": 11.0,
    "length": 22.0,
    "volume": 0.0,
    "related-products": [
      "AT2217001",
      "1801121"
    ],
    "erp-name": "Bike Attitude - Kædelås",
    "erp-weight": 770.0,
    "erp-unit": "STK",
    "las": [
      "Nøgle"
    ],
    "laasemekanisme": [
      "Nøgle"
    ],
    "montering": [
      "Aftagelig"
    ],
    "brand": "Bike Attitude",
    "forsikringsgodkendt": false
  },
  "localized_attributedata": {
    "da-DK": {
      "product-stock-days": "3",
      "name": "Bike Attitude - Kædelås",
      "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, kan du l&aring;se din cykel fast.</p>"
    },
    "sv-SE": {
      "name": "Bike Attitude - Kättinglås",
      "long-description": "<p> Med detta Bike Attitude-kedjelås kan du låsa din cykel när du inte använder den.</p>"
    },
    "nn-NO": {
      "name": "Bike Attitude - Kjettinglås",
      "long-description": "<p>Med denne kjedelåsen fra Bike Attitude kan du låse sykkelen når du ikke bruker den.</p>"
    }
  }
}

Get Multiple

This returns a represenation of a product.

URL : /:organizationid/:pimid/api/v0.1/products

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: read

Request example

[ "1000", "2000" ]

Response example

Success Response

Code: 200 OK

{
  "1000": {
    "name": "Bike Attitude - Kædelås",
    "channels": ['webshop'],
    "attributedata": {
      "unit": "STK"
    },
    "localized_attributedata": {
      "da-DK": {
        "product-stock-days": "3",
        "name": "Bike Attitude - Kædelås",
        "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, kan du l&aring;se din cykel fast.</p>"
      }
    }
  },
  "2000": {
    "name": "Bike Attitude - Kædelås 2",
    "channels": [],
    "attributedata": {
      "unit": "STK"
    },
    "localized_attributedata": {
      "da-DK": {
        "product-stock-days": "5",
        "name": "Bike Attitude - Kædelås 2",
        "long-description": "<p>Med denne Bike Attitude k&aelig;del&aring;s, 2 kan du l&aring;se din cykel fast.</p>"
      }
    }
  }
}

Search

This returns a list of products matching the filters given

URL : /:organizationid/:pimid/api/v0.1/productsearch

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Optional: limit=[int] max number of results pr. page

Optional: includeResources=[bool] include resource-references in result (Default: false)

Optional: includeLocalized=[bool] include localized attributes in result (Default: false)

Optional: lastoffsetid=[string] returns items with a id "greater" than this value. This can be used to page through results. A response with more items available than in the list, will return nextoffset-value to be used as lastoffsetid in next request. No default value - not supplying a value will omit this condition.

Method: POST

Auth required: YES

Authorization required: read

Body Parameters:

filter: Filter query (Not documented yet)

projection: Array of attributes to include. If not specified, all attributes are returned

excludeChannels: Array of channels to exlude. A product is excluded if at least of of the channels specified are present.

includeChannels: Array of channels to include. A product is included if at least of of the channels specified are present on the product. If not given, all products are returned.

excludeCategories: Array of categories to exlude. A product is excluded if at least of of the categories specified are present.

includeCategories: Array of categories to include. A product is included if at least of of the categories specified are present on the product. If not given, all products are returned.

localizedProjection: Array of localized-attributes to include. If not specified, all attributes are returned (can only be specified if includeLocalized parameter is true)

projectedLocales: List of locales included (can only be specified if includeLocalized parameter is true). If not specified, all locales are included.

Request example

{ 
    "filter": {
        "rules": [
        { "field": "variant-parent", "operator": "EXISTS" },
        { "field": "ean", "operator": "EQ", "value": "7319202702224" } 
        ],
        "groupingOperator": "AND"
    },
    "projection": ["variant-parent", "ean"],
    "excludedChannels": ["b2c"],
    "includedCategories": ["root_bikes"],
    "localizedProjection": ["name", "short-description","long-description"],
    "projectedLocales": ["da-DK"]
}

Success Response

Code: 200 OK

{
  "data": {
    "10006012": {
      "name": "Inhexskrue ISO4762",
      "attributedata": {
        "variant-parent": "Inhexskrue ISO4762",
        "ean": "7319202702224"
      },
      "channels": ["b2c", "b2b"],
      "categories": ["root_skruer"]
    },
    "10006020": {
      "name": "Inhexskrue ISO476",
      "attributedata": {
        "variant-parent": "Inhexskrue ISO4763",
        "ean": "7319202702224"
      },
      "channels": ["b2c"],
      "categories": ["root_skruer"]
    }
  },
  "counts": {
    "total": 6498,
    "count": 2
  },
  "nextOffset": "1031-25"
}

Patch Single

URL : /:organizationid/:pimid/api/v0.1/product/:productid

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: PATCH

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

Only attributedata attributes can be modified.

Request example

{
        "attributedata": {
            "brand": "Bike Attitude"
        }
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Patch Multiple

URL : /:organizationid/:pimid/api/v0.1/products

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: PATCH

Request headers:

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Auth required: YES

Authorization required: write

Only the properties in the request are modified. If properties are included but has no value, it's value will be deleted, so make sure to only include properties that are to be modified.

Only attributedata attributes can be modified.

Request example

{
    "1000": {
        "attributedata": {
            "brand": "Bike Attitude"
        }
    },
    "2000": {
        "attributedata": {
            "brand": "Bike Attitude 2"
        }
    }
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing one or more invalid products. Code: 400 BAD REQUEST

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Add Channel

URL : /:organizationid/:pimid/api/v0.1/product/:productid/channels

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Add the requested channels to the product.

Request example

['webshop-dk','webshop-se']

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Condition: Product already has one of the requested channels. Code: 409 CONFLICT

Remove Channel

URL : /:organizationid/:pimid/api/v0.1/product/:productid/channels

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: DELETE

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Remove the channels in the request from the product.

Request example

['webshop-se']

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Condition: Product does not have one of the requested channels. Code: 409 CONFLICT

Add Category

URL : /:organizationid/:pimid/api/v0.1/product/:productid/categoryrelations

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Add the requested categories to the product.

Request example

['root_123']

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Condition: Product already has one of the requested channels. Code: 409 CONFLICT

Remove Category

URL : /:organizationid/:pimid/api/v0.1/product/:productid/categoryrelations

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

productid=[string] is the ID of the Product to be updated.

Method: DELETE

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

X-BatchId: batchid if running a "full" import and afterwards deleting all entries without matching batchid

Remove the categories in the request from the product.

Request example

['root_123']

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Condition: Product does not have one of the requested channels. Code: 409 CONFLICT

Create new product

URL : /:organizationid/:pimappid/api/v0.2/product

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimappid=[string] is the APP ID of the PIM application.

allowrecreate=[bool] Allow a product to be (re)created even if it exists already and has been "soft"-deleted. All data from existing product will be lost. (Default: false)

Method: POST

Auth required: YES

Authorization required: write

Request headers:

Content-Type: application/json

Request example

{
    "sku": "123",
    "name": "Mit product",
    "datasource": "osd-importer"
    "attributedata": {
        "testsection": "testvalue"
    },
     "localized_attributedata": { "da-DK": { "name": "FALL LINE 30,9x350" } },
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: The member email has a conflict with another member Code: 409 CONFLICT

Remove Product

URL : /:organizationid/:pimid/api/v0.2/deleteproducts

URL Parameters:

organizationid=[string] is the ID of the chainbox.io organization.

pimid=[string] is the APP ID of the PIM application.

Method: POST

Auth required: YES

Authorization required: write

Request headers:

If-Unmodified-Since: Content of the Last-Modified of the GET-call

Remove the products in the request

Request example

['123', '322']

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid product. Code: 404 NOT FOUND

Condition: Update cannot be processed due to read-only, erp-mapped field etc. Code: 422 UNPROCESSABLE ENTITY

Condition: The product was modified since GET/If-Modified-Since timestamp Code: 412 PRECONDITION FAILED

Voucher

Best practise

How to successfully harvest data using this endpoint:

  1. Fetch locally stored lastReplicationTimestamp if applicaple

  2. Call max endpoint and store MaxTimestamp.

  3. Call updates endpoint with parameters: from = lastReplicationTimestamp, to = MaxTimestamp (and lastoffsetid = nextoffsetid from previous batch)

  4. Call softdeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  5. Call harddeletes endpoint with the same parameters as above. Before deleting locally, ensure that the deleted entity has the highest timestamp

  6. Save the stored value from step 2 (MaxTimestamp) as the new lastReplicationTimestamp

Max

This returns the max timestamp for a specific entity in order to know if there are relevant changes.

?> It is possible the reported max timestamp is irrelevant for the client/consumer (i.e. when using a filter with the related endpoints), in which case it would simply trigger an update routine with no changes.

URL : /:organizationid/:wsmid/api/v1/voucher/max

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "offset": "2021-12-01T08:20:16.421Z"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Updates

URL : /:organizationid/:wsmid/api/v1/voucher/:service/updates

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "createDate": "2021-06-21T10:30:33.603Z",
      "createdBy": "John Doe",
      "data": {
        "currency": "DKK",
        "exclude": [],
        "excludeGroups": [],
        "excludeProducts": [],
        "id": "ymippn4aj",
        "limitTo": [],
        "limitToGroups": [],
        "limitToProducts": [],
        "log": {},
        "lowerbound": 0,
        "name": "procenter",
        "relationType": "Product",
        "reusable": false,
        "status": 2,
        "type": 1,
        "validFrom": "2021-06-21T10:30:20.706Z",
        "validTo": "2021-06-23T10:30:20.706Z",
        "value": 20,
        "identifier": "0ec003ff-b503-4a92-80ab-62c533394cf2"
      },
      "id": "0ec003ff-b503-4a92-80ab-62c533394cf2",
      "lastUpdated": "2021-06-24T07:47:15.812Z",
      "type": "webshop-management-vouchers"
    }
  ],
  "nextoffsetid": "0ec003ff-b503-4a92-80ab-62c533394cf2"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Soft deletes

Soft deletes are documents from the same collection not matching the service filter. If there is no active filter (e.g. using the "default" service) - an empty result will be returned.

URL : /:organizationid/:wsmid/api/v1/voucher/:service/softdeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

service=[string] is the name of the Service Endpoint registered in the WSM application settings. Supplying "default" as the service requires no endpoint configuration and will not apply a filter to the result.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "0ec003ff-b503-4a92-80ab-62c533394cf2",
      "lastUpdated": "2021-07-09T07:42:50.445Z"
    }
  ],
  "nextoffsetid": "0ec003ff-b503-4a92-80ab-62c533394cf2"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Referencing an invalid service parameter. Code: 404 NOT FOUND

Hard deletes

Hard deletes are documents no longer in the collection.

?> It is possible the returned items are irrelevant for the client/consumer (i.e. when using a filter with the related endpoints). Match with existing IDs when appropriate.

URL : /:organizationid/:wsmid/api/v1/voucher/harddeletes

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

Querystring parameters:

to=[date] returns items with a lastupdated value less than or equal to this date.

(optional) from=[date] returns items with a lastupdated value greater than this date. No default value - not supplying a value will omit this condition.

(optional) lastoffsetid=[string] returns items with a documentid greater than this value. This can be used to page through results as the items are sorted by documentid internally. No default value - not supplying a value will omit this condition.

?> Note that documentid and item id do not match. Only supply values provided by the endpoint though nextoffsetid.

(optional) limit=[int] number of items returned. Default = 1000.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

{
  "result": [
    {
      "id": "0ec003ff-b503-4a92-80ab-62c533394cf2",
      "lastUpdated": "2021-12-06T09:40:08.499Z"
    }
  ],
  "nextoffsetid": "61adda78880433063295a467"
}

Error Responses

Condition: If basic auth header is not present in request or is incorrect.

Code: 401 UNAUTHORIZED

Get status

This returns the voucher status for a specific voucher.

?> Possible values include: Unused, Added, Used

URL : /:organizationid/:wsmid/api/v1/voucher/getstatus/:documentid

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

documentid=[string] is the Document ID of the voucher.

Method: GET

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

Used

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Invalid voucher refenrence. Code: 404 NOT FOUND

Update status

This updates the voucher status for a specific voucher.

?> Possible values include: Unused, Added, Used

URL : /:organizationid/:wsmid/api/v1/voucher/updatestatus/:documentid

URL Parameters: organizationid=[string] is the ID of the chainbox.io organization.

wsmid=[string] is the APP ID of the WSM application.

documentid=[string] is the Document ID of the voucher.

POST Body Parameters: VoucherStatus=[string (Unused|Added|Used)] is the new status for the voucher.

Method: POST

Auth required: YES

Permissions required: Basic Auth credentials to the api can be delivered by contacting our support.

Success Response

Condition: If Organization & WSM app exists and the given credentials are correct.

Code: 200 OK

Content example

No response data is returned.

Error Responses

Condition: If basic auth header is not present in request or is incorrect. Code: 401 UNAUTHORIZED

Condition: Invalid payload. Code: 400 BAD REQUEST

Voucher

Filtering

You can set parameters controlling for which products a Voucher applies.

You can filter based on:

  • Specific Products (Max 20)

  • Product Groups

You can also exclude products based on thoose two same parameters. They will take precedence over include-filters