NAV
Code PHP

Introduction

Welcome to the CycleSoftware API documentation

API type Documentation
CS api CycleSoftware API docs
Warehouse api Warehouse API docs
TWSC api TWSC API docs

API endpoint

Use the following domain: https://api.cyclesoftware.nl/ unless otherwise specified.

Requirements

To use the APIs you'll need API credentials. The API credentials are provided by CS or available in your account.

Request/Response Format

The APIs consist of SOAP/WSDL webservices and JSON endpoints.

The default response format is JSON. Requests with a message-body use plain JSON to set or update resource attributes. Successful requests will return a 200 OK HTTP status.

Some general information about responses:

Errors

Occasionally you might encounter errors when accessing the REST API. There are four possible types:

Error Code Error Type
400 Bad Request Invalid request, e.g. using an unsupported HTTP method, or GET variable
401 Unauthorized Authentication or permission error, e.g. incorrect credentials
403 Forbidden Authentication or permission error
404 Not Found Requests to resources that don't exist or are missing
500 Internal Server Error Server error

JSON error response

{
  "error": true,
  "error_message": "Unauthorized"
}

XML error response

<?xml version="1.0"?>
<result>
  <error>1</error>
  <error_message>Unauthorized</error_message>
</result>

SOAP error response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode>400</faultcode>
      <faultstring>The problem description</faultstring>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Errors return both an appropriate HTTP status code and response object which contains a error, and error_message

Parameters

Almost all endpoints accept optional parameters which can be passed as a HTTP query string parameter, e.g. GET /v1/endpoint?status=completed. All parameters are documented along each endpoint.

Pagination

For certain endpoints pagination is implemented. The mechanism differs per endpoint. But the default pagination mechanism is as follows:

JSON response

{
  "error": false,
  "error_message": null,
  "data": [],
  "pagination": {
    "next_offset": 1000
  }
}

GET /v1/endpoint?offset=1000

In the response the next_offset is suggested. You can pass the next offset in the offset GET paramater.

Limits

Since may 2022 api-limits are introduced. For endpoints that implement limits the following HTTP response headers are available.

If the limit is reached, the server will respond with an HTTP 429 - Too Many Requests error.

Libraries and Tools

Official libraries

Authentication

CycleSoftware uses different authentication mechanisms.

HTTP Basic Authentication

The credentials consist of a username, password and api-key. The username and password should be provided using the Basic HTTP authentication http header. The api-key is usage is documented per service.

SOAP/WSDL Authentication

The credentials consist of a username, password and api-key. The username and password should be provided within the Authentication element as documented per request. For dealer_id the actual store id within the account or api-key can be provided.

OAUTH2 Authentication

TWSC API is available throught Oauth2 authentication

Scopes

Credentials are linked to a set of scopes. Every endpoint is also linked to a set of scopes. If the required scope is not available for the credentials the API will provide an HTTP Unauthorized error.

Common

Access common data

Authentication mechanism

Enums

Get a set of enums with identifiers and descriptions used in various APIs

GET
/api/v1/common/enum.json

Types

Subject Description
sales_order_types Sales order type descriptions
sales_order_status Sales order status descriptions
sales_order_item_status Sales order item status descriptions
cancellation_types Cancellation reasons
pos_groups POS / Sales group descriptions
payment_methods Payment method descriptions
delivery_methods Delivery method descriptions
vat_codes VAT codes
workshop_order_status Workshop order status descriptions
customer_types Customer type descriptions
transaction_item_types Transaction item type descriptions (item_type / row_type)
service_item_status Status descriptions for object service items

HTTP Request

GET /api/v1/common/enum.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response (limited)

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 571
{
  "error": false,
  "error_message": null,
  "data": {
    "sales_order_types": [
      {
        "id": 0,
        "description": "Bestelling",
        "description_en": "Order"
      },
      {
        "id": 1,
        "description": "E-commerce",
        "description_en": "E-commerce"
      }
    ],
    "sales_order_status": [
      {
        "id": 2,
        "description": "In behandeling",
        "description_en": "Pending"
      },
      {
        "id": 8,
        "description": "Nog niet besteld",
        "description_en": "Not ordered"
      }
    ]
  }
}

Employees

Get a list of employees associated with the account

HTTP request examples

GET
/api/v1/common/employees.json

Properties

Property Type Nullable Description
error boolean false e.g. false
error_message string true e.g. Unauthorized
data array false array of objects
data[].employee_id integer false e.g. 4475
data[].employee_name string false e.g. John
data[].verification_hash string false e.g. 8fa5a0b532ca29bdc06b97586993e04d8432ac37d9ed6632b63ccc967f28dbcb sha256 hash mac with api-key as secret
data[].roles array false array of strings
data[].roles[] string false e.g. employee
data[].is_active boolean false e.g. false
data[].is_default boolean false e.g. false
data[].is_administrator boolean false e.g. false
data[].avatar string true URL to avatar or null
data[].authorizations array false array of strings
data[].authorizations[] string false e.g. MAY_ACCEPT_SALES_LEADS

HTTP Request

GET /api/v1/common/employees.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 1220
{
  "error": false,
  "error_message": null,
  "data": [
    {
      "employee_id": 44269,
      "employee_name": "John Doe",
      "verification_hash": "345ef8a695fded5cff8c2bfb83fa1bffc39f7bc9d13c589facac9ed2b41ebefe",
      "roles": [
        "employee"
      ],
      "is_active": true,
      "is_default": true,
      "is_administrator": false,
      "avatar": "https://s01.cyclesoftware.nl/app/cs/img/img_1_large_medewerker_44269.jpg",
      "authorizations": [
        "MAY_PERFORM_CYCLE_COUNT",
        "MAY_MODIFY_ARTICLE_PRICES",
        "MAY_REPLACE_ARTICLE",
        "MAY_MODIFY_ARTICLES",
        "MAY_IMPORT_SUPPLIER_ORDER",
        "MAY_SEND_SUPPLIER_ORDERS",
        "MAY_MANAGE_SUPPLIER_ORDERS",
        "MAY_DO_ANALYTICS"
      ]
    },
    {
      "employee_id": 1133,
      "employee_name": "Jane Doe",
      "verification_hash": "69baca4df93b1f213aff9d8582178ec6875da7d8c9bd030340d2de623aa19a69",
      "roles": [
        "mechanic"
      ],
      "is_active": true,
      "is_default": false,
      "is_administrator": false,
      "avatar": null,
      "authorizations": [
        "MAY_PERFORM_CYCLE_COUNT",
        "MAY_MODIFY_ARTICLE_PRICES",
        "MAY_REPLACE_ARTICLE"
      ]
    }
  ]
}
<?php
// example on how to check personal code of employee

$api_key = 'your-api-key';
$code = '1234';
$hash = \hash_hmac('sha256', $code, $api_key);
if(\hash_equals('data[].verification_hash', $hash)){
   // code is correct
}

Supplier list

Get a list of suppliers

HTTP request examples

GET
/api/v1/common/suppliers.json

Properties

Property Type Nullable Description
error boolean false e.g. false
error_message string true Error message if occured
data array false Array of suppliers
data[].type string false supplier, bike-brand or moped-brand
data[].supplier_id integer false Unique supplier ID 580
data[].supplier_name string false Name of supplier e.g. Accell NL
data[].parent_supplier_id integer true Brands may be linked to a parent supplier-id

HTTP Request

GET /api/v1/common/suppliers.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 331
{
  "error": false,
  "error_message": null,
  "data": [
    {
      "type": "supplier",
      "supplier_id": 122,
      "supplier_name": "Supplier A",
      "parent_supplier_id": null
    },
    {
      "type": "bike-brand",
      "supplier_id": 580,
      "supplier_name": "Brand one",
      "parent_supplier_id": 122
    }
  ]
}

E-commerce

The e-commerce APIs are designed for pushing e-commerce orders to CycleSoftware.

Authentication

The authentication is handled in the Authentication element of the SOAP requests.

Field Type Description
username string API credentials username
password string API credentials password
dealer_id string Leave empty or specify the store_id or use the API-key

Scope(s)

Definition

The latest definition of the WSDL specification can be found at:

WSDL-SOAP
/app/cs/api/ecommerce/soap_2_9/?wsdl

Properties

Property Type Description
Authentication[].username string e.g. your-username
Authentication[].password string e.g. your-password
Authentication[].dealer_id string store-id or api-key. e.g. 1
Order.order_reference_id string Unique order reference id 319813049
Order.order_reference_text string Unique order reference text 5640c085abba9
Order.order_is_payed boolean boolean 1 or 0
Order.order_payment_method_description string Use “psp” for payments using a Payment service Provider (e.g. iDEAL, Bancontact etc.): psp,pin,bancontact,contant,chip,creditcard,bank,rembours,ecocheques
Order.order_ship_to_customer boolean boolean 1 or 0
Order.order_shipment_method_description string e.g. tnt
Order.order_date_preferred_delivery date e.g. 2015-12-01
Order.order_remarks string e.g. remark example
Order.order_vat_country_code string Apply the VAT rates of this country code. CS will only apply the VAT rates if enabled in account settings and if order_ship_to_customer is true. If the VAT rates are not applied or the same as the country of the account, it will default back to null in the OrderStatusResponse
Order.order_sales_employee_id integer e.g. 10001 see Common / Employees endpoint for employee_id values
Order.Customer object see Customer.* property
Order.Customer.DeliveryAddress.delivery_address_use_delivery_address boolean Boolean 1 or 0
Order.Customer.DeliveryAddress.delivery_address_name string e.g. CycleSoftware
Order.Customer.DeliveryAddress.delivery_address_street_name string e.g. Kievitsven
Order.Customer.DeliveryAddress.delivery_address_postal_code string e.g. 5249JJ
Order.Customer.DeliveryAddress.delivery_address_housenumber string e.g. 4
Order.Customer.DeliveryAddress.delivery_address_housenumber_suffix string e.g. b
Order.Customer.DeliveryAddress.delivery_address_city string e.g. Rosmalen
Order.Customer.DeliveryAddress.delivery_address_country_code_iso_3166 string e.g. NL
Order.Customer.DeliveryAddress.delivery_address_remarks string e.g. Bam
Order.OrderItems.OrderItem array Array of OrderItem objects
Order.OrderItems.OrderItem[].order_item_is_bicycle boolean Indicate whether this order item is a sold bicycle (0 or 1)
Order.OrderItems.OrderItem[].order_item_barcode string e.g. 1000
Order.OrderItems.OrderItem[].order_item_quantity integer e.g. 2
Order.OrderItems.OrderItem[].order_item_description string e.g. Test product
Order.OrderItems.OrderItem[].order_item_unit_price_in_vat decimal e.g. 12.99
Order.OrderItems.OrderItem[].order_item_unit_discount_amount_in_vat decimal e.g. 2.99
Order.OrderItems.OrderItem[].order_item_vat_code integer 0: no VAT, 1: Low VAT, 2 High VAT
Order.OrderItems.OrderItem[].order_item_supplier_order_mode string 0: no supplier order or reservation on objects
1:automatically create supplier order for this sales order
2: automatically reserve available stock objects based on the object_id in order_item_object_id or order_item_barcode field.
4: Same as mode=2 with pool orders via warehouse
Order.OrderItems.OrderItem[].order_item_supplier_id integer When order_item_supplier_mode = 1, make the supplier order for this supplier. Supplier IDs can be looked up in https://api.cyclesoftware.nl/app/api/groups/
Order.OrderItems.OrderItem[].order_item_object_id integer Reserve this specific object for this order item
Order.OrderItems.OrderItem[].order_item_invoice_customer_id integer If supplied with integer value > 0 this order item will be invoiced to this customer id (SplitOrder) All the customer info in the SaveOrder should be the “rider” or “consumer”
UpdateValues.UpdateValue array Array of UpdateValue objects
UpdateValues.UpdateValue[].name string Field to update: order_reference_text, order_is_payed,order_payment_method_description,order_ship_to_customer,order_shipment_method_description,order_date_preferred_delivery,order_track_trace_reference,order_remarks
UpdateValues.UpdateValue[].value string e.g. Will pickup at 13.00
Customer.customer_type_name string One of the following: Klant, Leverancier, E-commerce, Zakelijk, Lease-rijder, Lease-maatschappij, Werkgever
Customer.customer_cs_customer_id string e.g. 235238848
Customer.customer_reference string Should be an unique reference to the customer to prevent re-use / overwrites of existing customers
Customer.customer_name_prefix string e.g. Dhr.
Customer.customer_first_name string e.g. Adri
Customer.customer_name_initials string e.g. A
Customer.customer_middle_name string e.g. Van
Customer.customer_last_name string e.g. Name 235238848
Customer.customer_postal_code string e.g. 8448PE
Customer.customer_housenumber string e.g. 32
Customer.customer_housenumber_suffix string e.g. B
Customer.customer_street_name string e.g. Mauritslaan
Customer.customer_city string e.g. Heerenveen
Customer.customer_phone string e.g. 073-1234567
Customer.customer_mobile string e.g. 06-124235335
Customer.customer_country_code_iso_3166 string Country code iso3166 e.g. NL
Customer.customer_email string e.g. test235238848@cyclesoftware.nl
Customer.customer_newsletter boolean Toggle newsletter option boolean 1 or 0
Customer.customer_date_of_birth date e.g. 1980-01-01
Customer.customer_iban string e.g. NL69INGB0123456789

SaveOrder

Creates a new order in CycleSoftware

<?php


try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
            'trace' => true,
            'use' => SOAP_LITERAL,
            'encoding' => 'UTF-8',
        ]
    );
   $input = (object)[
        'Authentication' =>
            (object)[
                'username' => 'your-username',
                'password' => 'your-password',
                'dealer_id' => '1', // store-id within account
            ],
        'Order' =>
            (object)[
                'order_reference_text' => '5640c085abba9',
                'order_reference_id' => '319813049',
                'order_is_payed' => '1',
                'order_payment_method_description' => 'psp',
                'order_ship_to_customer' => '1',
                'order_shipment_method_description' => 'tnt',
                'order_date_preferred_delivery' => '2015-12-01',
                'order_remarks' => 'remark example',
                'order_vat_country_code' => 'NL',
                'order_sales_employee_id ' => null,
                'Customer' =>
                    (object)[
                        'customer_cs_customer_id' => '11',
                        'customer_reference' => 'unique-reference-customer',
                        'customer_name_prefix' => 'Dhr.',
                        'customer_name_initials' => 'J',
                        'customer_first_name' => 'Jan',
                        'customer_middle_name' => 'van',
                        'customer_last_name' => 'Dijk',
                        'customer_postal_code' => '1000AA',
                        'customer_housenumber' => '2',
                        'customer_housenumber_suffix' => 'B',
                        'customer_street_name' => 'Steenweg',
                        'customer_city' => 'Amsterdam',
                        'customer_phone' => '0733030050',
                        'customer_mobile' => '0612345678',
                        'customer_country_code_iso_3166' => 'NL',
                        'customer_email' => 'test@test.com',
                        'customer_newsletter' => '1',
                        'customer_date_of_birth' => '',
                        'customer_iban' => '',
                        'DeliveryAddress' =>
                            (object)[
                                'delivery_address_use_delivery_address' => '1',
                                'delivery_address_name' => 'Bedrijfsnaam',
                                'delivery_address_street_name' => 'Steenweg',
                                'delivery_address_postal_code' => '1000AA',
                                'delivery_address_housenumber' => '2',
                                'delivery_address_housenumber_suffix' => 'B',
                                'delivery_address_city' => 'Amsterdam',
                                'delivery_address_country_code_iso_3166' => 'NL',
                                'delivery_address_remarks' => 'Extra opmerking',
                            ],
                    ],
                'OrderItems' =>
                    (object)[
                        'OrderItem' =>
                            [
                                    (object)[
                                        'order_item_is_bicycle' => '0',
                                        'order_item_barcode' => '88237237239',
                                        'order_item_quantity' => '-1',
                                        'order_item_description' => 'Some article',
                                        'order_item_unit_price_in_vat' => '1021',
                                        'order_item_unit_discount_amount_in_vat' => '21',
                                        'order_item_vat_code' => '2',
                                        'order_item_supplier_order_mode' => '0',
                                        'order_item_invoice_customer_id' => 4,
                                    ],
                                    (object)[
                                        'order_item_is_bicycle' => '0',
                                        'order_item_barcode' => '47348340934',
                                        'order_item_quantity' => '1',
                                        'order_item_description' => 'Some Article',
                                        'order_item_unit_price_in_vat' => '1521',
                                        'order_item_unit_discount_amount_in_vat' => '21',
                                        'order_item_vat_code' => '2',
                                        'order_item_supplier_order_mode' => '0',
                                        'order_item_invoice_customer_id' => '2',
                                    ],
                                    (object)[
                                        'order_item_is_bicycle' => '0',
                                        'order_item_barcode' => '43934939344',
                                        'order_item_quantity' => '3',
                                        'order_item_description' => 'Some article',
                                        'order_item_unit_price_in_vat' => '1021',
                                        'order_item_unit_discount_amount_in_vat' => '21',
                                        'order_item_vat_code' => '2',
                                        'order_item_supplier_order_mode' => '0',
                                        'order_item_invoice_customer_id' => null,
                                    ],
                            ],
                    ],
            ],
    ];
    $result = $client->SaveOrder($input);
    $order_id = $result->order_id;
    $customer_id = $result->customer_id;
    var_dump($result);
}
catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

HTTP Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "SaveOrder"
Content-length: 4614

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_1/">
  <SOAP-ENV:Body>
    <ns1:SaveOrderRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <Order>
        <order_reference_id>319813049</order_reference_id>
        <order_reference_text>5640c085abba9</order_reference_text>
        <order_is_payed>1</order_is_payed>
        <order_payment_method_description>psp</order_payment_method_description>
        <order_ship_to_customer>1</order_ship_to_customer>
        <order_shipment_method_description>tnt</order_shipment_method_description>
        <order_date_preferred_delivery>2015-12-01</order_date_preferred_delivery>
        <order_remarks>remark example</order_remarks>
        <order_vat_country_code>NL</order_vat_country_code>
        <order_sales_employee_id/>
        <Customer>
          <customer_cs_customer_id>0</customer_cs_customer_id>
          <customer_reference>unique-reference-customer</customer_reference>
          <customer_name_prefix>J</customer_name_prefix>
          <customer_middle_name>van</customer_middle_name>
          <customer_last_name>Dijk</customer_last_name>
          <customer_postal_code>1000AA</customer_postal_code>
          <customer_housenumber>2</customer_housenumber>
          <customer_housenumber_suffix>B</customer_housenumber_suffix>
          <customer_street_name>Steenweg</customer_street_name>
          <customer_city>Amsterdam</customer_city>
          <customer_phone>0733030050</customer_phone>
          <customer_mobile>0612345678</customer_mobile>
          <customer_country_code_iso_3166>NL</customer_country_code_iso_3166>
          <customer_email>test@test.com</customer_email>
          <customer_newsletter>1</customer_newsletter>
          <customer_iban>NL69INGB0123456789</customer_iban>
          <customer_date_of_birth>1988-09-29</customer_date_of_birth>
          <DeliveryAddress>
            <delivery_address_use_delivery_address>1</delivery_address_use_delivery_address>
            <delivery_address_name>CycleSoftware</delivery_address_name>
            <delivery_address_street_name>Kievitsven</delivery_address_street_name>
            <delivery_address_postal_code>5249JJ</delivery_address_postal_code>
            <delivery_address_housenumber>4</delivery_address_housenumber>
            <delivery_address_housenumber_suffix>b</delivery_address_housenumber_suffix>
            <delivery_address_city>Rosmalen</delivery_address_city>
            <delivery_address_country_code_iso_3166>NL</delivery_address_country_code_iso_3166>
            <delivery_address_remarks>Bam</delivery_address_remarks>
          </DeliveryAddress>
        </Customer>
        <OrderItems>
          <OrderItem>
            <order_item_is_bicycle>0</order_item_is_bicycle>
            <order_item_barcode>1000</order_item_barcode>
            <order_item_quantity>2</order_item_quantity>
            <order_item_description>DescriptionTest</order_item_description>
            <order_item_unit_price_in_vat>12.99</order_item_unit_price_in_vat>
            <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
            <order_item_vat_code>2</order_item_vat_code>
            <order_item_supplier_order_mode>0</order_item_supplier_order_mode>
            <order_item_supplier_id>0</order_item_supplier_id>
            <order_item_object_id>0</order_item_object_id>
            <order_item_invoice_customer_id>0</order_item_invoice_customer_id>
          </OrderItem>
          <OrderItem>
            <order_item_is_bicycle>0</order_item_is_bicycle>
            <order_item_barcode>1000</order_item_barcode>
            <order_item_quantity>2</order_item_quantity>
            <order_item_description>DescriptionTest</order_item_description>
            <order_item_unit_price_in_vat>12.99</order_item_unit_price_in_vat>
            <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
            <order_item_vat_code>2</order_item_vat_code>
            <order_item_supplier_order_mode>0</order_item_supplier_order_mode>
            <order_item_supplier_id>0</order_item_supplier_id>
            <order_item_object_id>0</order_item_object_id>
            <order_item_invoice_customer_id>1000</order_item_invoice_customer_id>
          </OrderItem>
        </OrderItems>
      </Order>
    </ns1:SaveOrderRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


HTTP/1.1 200 
Content-type: application/xml; charset=utf-8
Content-length: 2083

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SaveOrderResponse>
      <order_id>3688</order_id>
      <customer_id>1498</customer_id>
      <created_new_order>1</created_new_order>
      <remarks>
      </remarks>
      <OrderItems>
        <OrderItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_object_id>0</order_item_object_id>
          <order_item_barcode>1000</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>Test product</order_item_description>
          <order_item_unit_price_in_vat>12.99</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_line_id>1</order_item_line_id>
          <order_item_object_id/>
          <order_item_invoice_customer_id/>
        </OrderItem>
        <OrderItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_object_id>0</order_item_object_id>
          <order_item_barcode>1000</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>Test product</order_item_description>
          <order_item_unit_price_in_vat>12.99</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_line_id>2</order_item_line_id>
          <order_item_object_id/>
          <order_item_invoice_customer_id>1000</order_item_invoice_customer_id>
        </OrderItem>
    </SaveOrderResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

UpdateOrder

Update some header fields in the sales order. The following fields can be updated:

<?php

try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
            'trace' => true,
            'use' => SOAP_LITERAL,
            'encoding' => 'UTF-8',
        ]
    );
    $input = (object)[
        'Authentication' =>
            (object)[
                'username' => 'your-username',
                'password' => 'your-password',
                'dealer_id' => '1', // store-id within account
            ],
        'order_id' => '3623',
        'order_reference_id' => '',
        'UpdateValues' =>
            (object)[
                'UpdateValue' =>
                    [
                        0 =>
                            (object)[
                                'name' => 'order_date_preferred_delivery',
                                'value' => '2021-10-05 08:03:31',
                            ],
                        1 =>
                            (object)[
                                'name' => 'order_reference_text',
                                'value' => '615beab217c75',
                            ],
                        2 =>
                            (object)[
                                'name' => 'order_track_trace_reference',
                                'value' => '615beab217c76',
                            ],
                    ],
            ],
    ];
    $result = $client->UpdateOrder($input);
    var_dump($result);
}
catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "UpdateOrder"
Content-length: 846

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_1/">
  <SOAP-ENV:Body>
    <ns1:UpdateOrderRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <order_id>3623</order_id>
      <order_reference_id>
      </order_reference_id>
      <UpdateValues>
        <UpdateValue>
          <name>order_date_preferred_delivery</name>
          <value>2015-11-09 15:50:35</value>
        </UpdateValue>
        <UpdateValue>
          <name>order_remarks</name>
          <value>Will pickup at 13.00</value>
        </UpdateValue>
      </UpdateValues>
    </ns1:UpdateOrderRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


HTTP/1.1 200 
Content-type: application/xml; charset=utf-8
Content-length: 2446

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_1/">
  <SOAP-ENV:Body>
    <ns1:OrderStatusResponse>
      <order_id>3623</order_id>
      <order_reference_text>563c8b1bc4ada</order_reference_text>
      <order_reference_id>-663982782</order_reference_id>
      <order_status_text>In behandeling</order_status_text>
      <order_track_trace_reference>563c8b1bc4ada</order_track_trace_reference>
      <order_date_preferred_delivery>2015-11-09 15:50:35</order_date_preferred_delivery>
      <order_vat_country_code/>
      <order_sales_employee_id>11111</order_sales_employee_id>
      <customer_id>1498</customer_id>
      <invoice_id>0</invoice_id>
      <OrderResultItems>
        <OrderResultItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>1</order_item_is_bicycle>
          <order_item_barcode>1000</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>Test product</order_item_description>
          <order_item_unit_price_in_vat>10.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_line_id>3</order_item_line_id>
          <order_item_object_id/>
          <order_item_invoice_customer_id/>
        </OrderResultItem>
        <OrderResultItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_barcode>1000</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>Test product</order_item_description>
          <order_item_unit_price_in_vat>10.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_line_id>5</order_item_line_id>
          <order_item_object_id>0</order_item_object_id>
          <order_item_invoice_customer_id>1000</order_item_invoice_customer_id>
        </OrderResultItem>
      </OrderResultItems>
    </ns1:OrderStatusResponse>
  </SOAP-ENV:Body>

Create invoice(s)

Create invoice(s) for sales order. If the sales-order is split amongst several customers, the result will yield multiple invoices.

POST
/api/v1/sales/orders/:sales_order_id/create-invoices.json
URL parameter Type Description
:sales_order_id integer Sales order ID required

Limits

See API limits for more information about API rate limiting.

Type Limit Description
minutely-limit 15 15 requests per minute allowed
daily-limit default The default daily limit applies

The following optional POST parameters can be used to specify specific behavior.

POST parameter Type Default Description
employee_id integer The sales employee registered for the sales-order Employee ID for registration
order_status_id integer null New sales order status. See common endpoint
book boolean false if true, the invoice will be booked in administration. Otherwise the invoice will be pro-forma
customer_messages boolean true if true a phone- of e-mail message will be sent (according to account settings) to inform the customer
allow_resend_messages integer false if true a phone- of e-mail message will be sent again if there were previous messages

Properties

Property Type Nullable Description
error boolean false true if an error occurred
error_message null true Error message if occurred
invoices array false array of created invoices
invoices[].invoice_number integer false Invoice number e.g. 20173383
invoices[].customer_id integer false Customer number of invoice e.g. 9011
invoices[].sent_messages.phone_message boolean false true if a phone message was sent
invoices[].sent_messages.email_message boolean false true if an e-mail message was sent
invoices[].documents array false Array of generated documents
invoices[].documents[].document_mime_type string false Mime type of the document e.g. application/pdf
invoices[].documents[].document_base64 string false Base64 encoded string of document

HTTP request

POST /api/v1/sales/orders/1000/create-invoices.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/x-www-form-urlencoded; charset=utf-8
Content-length: 299

employee_id=1005&order_status_id=9&book=1&customer_messages=1&allow_resend_messages=1

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 900

{
    "error": false,
    "error_message": null,
    "invoices": [
        {
            "invoice_number": 20173382,
            "customer_id": 6298,
            "sent_messages": {
                "phone_message": true,
                "email_message": false
            },
            "documents": [
                {
                    "document_mime_type": "application/pdf",
                    "document_base64": "VBERi0xLjcKJ..."
                }
            ]
        },
        {
            "invoice_number": 20173383,
            "customer_id": 9011,
            "sent_messages": {
                "phone_message": false,
                "email_message": false
            },
            "documents": [
                {
                    "document_mime_type": "application/pdf",
                    "document_base64": "VBERi0xLjcKJ..."
                }
            ]
        }
    ]
}

AddOrderItems

Add new order items to an existing order.

try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
            'trace' => true,
            'use' => SOAP_LITERAL,
            'encoding' => 'UTF-8',
        ]
    );
    $input = (object)[
        'Authentication' =>
            (object)[
                'username' => 'your-username',
                'password' => 'your-password',
                'dealer_id' => '1', // store-id within account
            ],
        'order_id' => '684476',
        'order_reference_id' => '',
        'OrderItems' => (object)[
                'OrderItem' =>
                    [
                        (object)[
                            'order_item_is_bicycle' => '0',
                            'order_item_barcode' => '872382382323',
                            'order_item_quantity' => '2',
                            'order_item_description' => 'DescriptionTest',
                            'order_item_unit_price_in_vat' => '12.99',
                            'order_item_unit_discount_amount_in_vat' => '2.99',
                            'order_item_invoice_customer_id' => null,
                        ],
                        (object)[
                            'order_item_is_bicycle' => '0',
                            'order_item_barcode' => '4624824934349',
                            'order_item_quantity' => '2',
                            'order_item_description' => 'For lease company',
                            'order_item_unit_price_in_vat' => '12.99',
                            'order_item_unit_discount_amount_in_vat' => '2.99',
                            'order_item_vat_code' => '2',
                            'order_item_invoice_customer_id' => '10003',
                        ],
                    ],
            ],
    ];
    $result = $client->AddOrderItems($input);
    var_dump($result);
}
catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "AddOrderItems"
Content-length: 1373

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_1/">
  <SOAP-ENV:Body>
    <ns1:AddOrderItemsRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <order_id>3692</order_id>
      <order_reference_id>
      </order_reference_id>
      <OrderItems>
        <OrderItem>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_barcode>5640c122a30b9</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>DescriptionTest</order_item_description>
          <order_item_unit_price_in_vat>12.99</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_supplier_order_mode>0</order_item_supplier_order_mode>
          <order_item_supplier_id>0</order_item_supplier_id>
          <order_item_object_id>0</order_item_object_id>
          <order_item_invoice_customer_id>1000</order_item_invoice_customer_id>
        </OrderItem>
      </OrderItems>
    </ns1:AddOrderItemsRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


HTTP/1.1 200 
Content-type: application/xml; charset=utf-8
Content-length: 2464

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_1/">
  <SOAP-ENV:Body>
    <ns1:OrderStatusResponse>
      <order_id>3692</order_id>
      <order_reference_text>5640c122154db</order_reference_text>
      <order_reference_id>-319656665</order_reference_id>
      <order_status_text>In behandeling</order_status_text>
      <order_track_trace_reference>
      </order_track_trace_reference>
      <order_date_preferred_delivery>2015-12-01 00:00:00</order_date_preferred_delivery>
      <order_sales_employee_id>1212</order_sales_employee_id>
      <customer_id>1498</customer_id>
      <invoice_id>0</invoice_id>
      <OrderResultItems>
        <OrderResultItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>1</order_item_is_bicycle>
          <order_item_barcode>1000</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>Test product</order_item_description>
          <order_item_unit_price_in_vat>10.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>1</order_item_vat_code>
          <order_item_line_id>3</order_item_line_id>
          <order_item_object_id>0</order_item_object_id>
          <order_item_invoice_customer_id/>
        </OrderResultItem>
        <OrderResultItem>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_barcode>5640c122a30b9</order_item_barcode>
          <order_item_quantity>2</order_item_quantity>
          <order_item_description>DescriptionTest</order_item_description>
          <order_item_unit_price_in_vat>10.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>2.99</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_line_id>5</order_item_line_id>
          <order_item_object_id>0</order_item_object_id>
          <order_item_invoice_customer_id>1000</order_item_invoice_customer_id>
        </OrderResultItem>
      </OrderResultItems>
    </ns1:OrderStatusResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetInvoiceDocument

Get an invoice document based on the invoice-number.

<?php
try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
          'trace' => true,
          'use' => SOAP_LITERAL,
          'encoding' => 'UTF-8',
        ]
    );
    $input = (object)[];
    $input->Authentication = (object)[];
    $input->Authentication->username = 'your-username';
    $input->Authentication->password = 'your-password';
    $input->Authentication->dealer_id = '1';
    $input->invoice_number = '44848';
    $result = $client->GetInvoiceDocument($input);
    var_dump($result);
} catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "GetInvoiceDocument"
Content-length: 514

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_0/">
  <SOAP-ENV:Body>
    <ns1:GetInvoiceDocumentRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <invoice_number>44848</invoice_number>
    </ns1:GetInvoiceDocumentRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 200
Content-type: application/xml; charset=utf-8
Content-length: 396

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <GetInvoiceDocumentResponse>
      <invoice_number>44848</invoice_number>
      <data>data:application/pdf;base64,JVBERi0xLjcKMyAwIG9iago8PC9UeXBlIC9QYWdlIC9QYXJlbnQgMS.....==</data>
    </GetInvoiceDocumentResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetOrderStatus

Get an invoice document based on the sales order id or order reference.

<?php
try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
          'trace' => true,
          'use' => SOAP_LITERAL,
          'encoding' => 'UTF-8',
        ]
    );
    $input = (object)[];
    $input->Authentication = (object)[];
    $input->Authentication->username = 'your-username';
    $input->Authentication->password = 'your-password';
    $input->Authentication->dealer_id = '1';
    $input->order_id = '44848';
    $input->order_reference_id = '61a0d79989fa3';//optional
    $result = $client->GetOrderStatus($input);
    var_dump($result);
} catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "GetOrderStatus"
Content-length: 580

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_0/">
  <SOAP-ENV:Body>
    <ns1:GetInvoiceDocumentRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <order_id>711075</order_id>
      <order_reference_id>61a0d79989fa3</order_reference_id>
    </ns1:GetInvoiceDocumentRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 200
Content-type: application/xml; charset=utf-8
Content-length: 2595

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_0/">
  <SOAP-ENV:Body>
    <ns1:OrderStatusResponse>
      <order_id>711075</order_id>
      <order_reference_text>61a0d79989fa3</order_reference_text>
      <order_reference_id>1637930905565</order_reference_id>
      <order_status_text>In behandeling</order_status_text>
      <order_track_trace_reference/>
      <order_date_preferred_delivery>2020-12-01 00:00:00</order_date_preferred_delivery>
      <order_vat_country_code>BE</order_vat_country_code>
      <customer_id>11</customer_id>
      <invoice_id>0</invoice_id>
      <order_sales_employee_id>10369</order_sales_employee_id>
      <OrderResultItems>
        <OrderResultItem>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_object_id xsi:nil="true"/>
          <order_item_barcode>$barcode</order_item_barcode>
          <order_item_quantity>-1</order_item_quantity>
          <order_item_description>SomeBatavus</order_item_description>
          <order_item_unit_price_in_vat>1021.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>21.00</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_line_id>1</order_item_line_id>
          <order_item_invoice_customer_id>4</order_item_invoice_customer_id>
        </OrderResultItem>
        <OrderResultItem>
          <order_item_is_bicycle>0</order_item_is_bicycle>
          <order_item_object_id xsi:nil="true"/>
          <order_item_barcode>$barcode</order_item_barcode>
          <order_item_quantity>1</order_item_quantity>
          <order_item_description>SomeBatavus</order_item_description>
          <order_item_unit_price_in_vat>1521.00</order_item_unit_price_in_vat>
          <order_item_unit_discount_amount_in_vat>21.00</order_item_unit_discount_amount_in_vat>
          <order_item_vat_code>2</order_item_vat_code>
          <order_item_status_id>0</order_item_status_id>
          <order_item_status_text>Geen status</order_item_status_text>
          <order_item_line_id>2</order_item_line_id>
          <order_item_invoice_customer_id>2</order_item_invoice_customer_id>
        </OrderResultItem>
    </ns1:OrderStatusResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

CreateOrUpdateCustomer

This method creates or updates an existing customer. Existing customers are matched on customer_id, customer_phone , customer_mobile, customer_reference or customer_email.

<?php
try {
    $client = new \SoapClient(
        'https://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_9/?wsdl',
        [
            'trace' => true,
            'use' => SOAP_LITERAL,
            'encoding' => 'UTF-8',
        ]
    );
    $input = (object) array(
        'Authentication' => (object) array(
            'username' => 'your-username',
            'password' => 'your-password',
            'dealer_id' => '1', // store-id within account
        ),
        'customer_type_name' => '',
        'Customer' => (object)array(
            'customer_id' => 46,
            'customer_cs_customer_id' => 235238848,
            'customer_reference' => 'unique-reference-customer',
            'customer_name_prefix' => 'Dhr.',
            'customer_name_initials' => 'A',
            'customer_first_name' => 'Adri',
            'customer_middle_name' => 'Van',
            'customer_last_name' => 'Name 235238848',
            'customer_postal_code' => '8448PE',
            'customer_housenumber' => '32',
            'customer_housenumber_suffix' => 'B',
            'customer_street_name' => 'Mauritslaan',
            'customer_city' => 'Heerenveen',
            'customer_phone' => '073-3030050',
            'customer_mobile' => '06-24238848',
            'customer_country_code_iso_3166' => 'NL',
            'customer_email' => 'test235238848@cyclesoftware.nl',
            'customer_newsletter' => '0',
            'customer_date_of_birth' => NULL,
            'customer_iban' => 'NL69INGB0123456789',
            'DeliveryAddress' => NULL,
        )
    );
    $result = $client->CreateOrUpdateCustomer($input);
    var_dump($result);
} catch (\SoapFault $e) {
    var_dump($e->getMessage());
}

Request

POST /app/cs/api/ecommerce/soap_2_9/ HTTP/1.1
Host: api.cyclesoftware.nl
Accept-encoding: gzip
Accept: text/xml
Content-type: text/xml; charset=utf-8
User-agent: SoapClient
Soapaction: "CreateOrderUpdateCustomer"
Content-length: 1648

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_0/">
  <SOAP-ENV:Body>
    <ns1:CreateOrUpdateCustomerRequest>
      <Authentication>
        <username>your-username</username>
        <password>your-password</password>
        <dealer_id>1</dealer_id>
      </Authentication>
      <Customer>
        <customer_type_name>Lease-maatschappij</customer_type_name>
        <customer_cs_customer_id>235238848</customer_cs_customer_id>
        <customer_reference>unique-reference-customer</customer_reference>
        <customer_name_prefix>Dhr.</customer_name_prefix>
        <customer_name_first_name>Adri</customer_first_name>
        <customer_name_initials>A</customer_name_initials>
        <customer_middle_name>Van</customer_middle_name>
        <customer_last_name>Name 235238848</customer_last_name>
        <customer_postal_code>8448PE</customer_postal_code>
        <customer_housenumber>32</customer_housenumber>
        <customer_housenumber_suffix>B</customer_housenumber_suffix>
        <customer_street_name>Mauritslaan</customer_street_name>
        <customer_city>Heerenveen</customer_city>
        <customer_phone>073-1234567</customer_phone>
        <customer_mobile>06-124235335</customer_mobile>
        <customer_country_code_iso_3166>NL</customer_country_code_iso_3166>
        <customer_email>test235238848@cyclesoftware.nl</customer_email>
        <customer_newsletter>0</customer_newsletter>
        <customer_date_of_birth/>
        <customer_iban>NL69INGB0123456789</customer_iban>
      </Customer>
    </ns1:CreateOrUpdateCustomerRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


HTTP/1.1 200
Content-type: application/xml; charset=utf-8
Content-length: 1448

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="http://api.cyclesoftware.nl/app/cs/api/ecommerce/soap_2_0/">
  <SOAP-ENV:Body>
    <ns1:CreateOrUpdateCustomerResponse>
      <is_new_customer>false</is_new_customer>
      <Customer>
        <customer_cs_customer_id>235238848</customer_cs_customer_id>
        <customer_reference>REF46</customer_reference>
        <customer_name_prefix>Dhr.</customer_name_prefix>
        <customer_name_first_name>Adri</customer_name_first_name>
        <customer_name_initials>A</customer_name_initials>
        <customer_middle_name>Van</customer_middle_name>
        <customer_last_name>Name 235238848</customer_last_name>
        <customer_postal_code>8448PE</customer_postal_code>
        <customer_housenumber>32</customer_housenumber>
        <customer_housenumber_suffix>B</customer_housenumber_suffix>
        <customer_street_name>Mauritslaan</customer_street_name>
        <customer_city>Heerenveen</customer_city>
        <customer_phone></customer_phone>
        <customer_mobile>0733030050</customer_mobile>
        <customer_country_code_iso_3166>NL</customer_country_code_iso_3166>
        <customer_email>test235238848@cyclesoftware.nl</customer_email>
        <customer_newsletter>0</customer_newsletter>
        <customer_date_of_birth/>
        <customer_iban></customer_iban>
      </Customer>
    </ns1:CreateOrUpdateCustomerResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Article data

The articledata APIs are designed for pulling article-information for e-commerce environments.

Authentication

Articledata

Get article data available for e-commerce environments or for a specific barcode.

GET
/app/api/v3/articledata/
GET
/app/api/v3/articledata/:next_resultset
GET
/app/api/v3/articleinfo/:barcode

Pagination

In every response you'll find a path to the next resultset. In the example the next resultset is /app/api/v3/articledata/750-750-0/. If next_resultset is null no additional data is available.

HTTP Request

GET /app/api/v3/articledata/ HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json

HTTP Response

{
    "error": false,
    "error_message": "",
    "results": 750,
    "next_resultset": "/app/api/v3/articledata/750-750-0/",
    "property_definition": "/app/api/v3/articledata/definition/",
    "supplier_data_columns": [
        "reference",
        "supplier_name",
        "supplier_id",
        "article_id",
        "barcode",
        "brand",
        "model",
        "color",
        "pos_description",
        "size",
        "purchase_price",
        "vat_code",
        "rrp",
        "model_year",
        "product_pos_group_id",
        "main_group",
        "sub_group",
        "sub_sub_group",
        "supplier_sub_group",
        "supplier_subsub_group",
        "order_code",
        "order_quantity",
        "min_order_quantity",
        "status_code",
        "package_contents_quantity",
        "customer_group",
        "keyword",
        {
            "properties": {
                "33": "location",
                "34": "primary_color",
                "35": "secundary_basic_color",
                "36": "weight_bruto",
                "37": "weight_netto",
                "43": "long_description",
                "46": "wheelsize",
                "47": "frametype",
                "105": "keyword",
                "106": "customer_group",
                "108": "model_id",
                "131": "url_article_information",
                "133": "highres_image_url",
                "137": "image_url",
                "139": "video_url",
                "140": "basic_color",
                "141": "size",
                "142": "pos_description",
                "143": "description",
                "203": "width_package",
                "205": "height_package",
                "206": "length_package",
                "232": "user_manual",
                "233": "technical_guide"
            }
        }
    ],
    "data": [
        {
            "modified_at": "26-07-2020",
            "barcode": "0008022142197",
            "parent_barcode": null,
            "is_bicycle": false,
            "bicycle_id": null,
            "has_stock": false,
            "is_discontinued": false,
            "salesprice": "40.75",
            "rrp": "39.95",
            "lease_options": [],
            "removal_fee": "0.00",
            "purchase_price": "0.00",
            "pos_description": "STANDAARD URSUS 26 TWEEPOOT ZWART",
            "brand": "Ursus",
            "promo_salesprice": "0.00",
            "promo_startdate": null,
            "promo_enddate": null,
            "sales_text": "",
            "custom_variable_1": null,
            "custom_variable_2": null,
            "custom_variable_3": null,
            "custom_variable_4": null,
            "custom_variable_5": null,
            "custom_variable_6": "",
            "images": [
                {
                    "date_modified": "08-05-2012 08:02:58",
                    "url_thumb": "http://s02.cyclesoftware.nl/app/img/Y/artPic_public_T_18563.jpg",
                    "url_large": "http://s02.cyclesoftware.nl/app/img/Y/artPic_public_L_18563.jpg"
                }
            ],
            "product_group_main": "O&A",
            "product_group_sub": "Onderdelen/Reparatie",
            "product_group_sub_sub": "Standaarden",
            "product_group_id": "2_N_1",
            "product_pos_group_id": "21",
            "article_location": null,
            "supplier_data": [
                [
                    "7177049",
                    "ACCELL NL",
                    "5229",
                    "680862",
                    "0008022142197",
                    "URSUS",
                    "JUMBO",
                    "ZWART",
                    "STANDAARD URSUS 26 JUMBO TWEEPOOT ZWART",
                    "",
                    "0.00",
                    "H",
                    "39.95",
                    "0",
                    "21",
                    "O&A",
                    "Onderdelen/Reparatie",
                    "Standaarden",
                    null,
                    null,
                    "",
                    "1",
                    "1",
                    "VERVALLEN",
                    "1",
                    "",
                    "STANDAARD",
                    {
                        "34": "ZWART",
                        "43": "STANDAARD URSUS 26 JUMBO TWEEPOOT ZWART",
                        "105": "STANDAARD",
                        "137": [
                            "http://www.accentry.com/upload/Juncker/680862.JPG"
                        ],
                        "140": "ZWART",
                        "142": "STANDAARD URSUS 26 JUMBO",
                        "143": "STANDAARD URSUS 26 JUMBO TWEEPOOT ZWART"
                    }
                ]
            ]
        },
        {
            "modified_at": "10-02-2022",
            "barcode": "0091021578005",
            "parent_barcode": null,
            "is_bicycle": false,
            "bicycle_id": null,
            "has_stock": false,
            "is_discontinued": false,
            "salesprice": "139.95",
            "rrp": "139.95",
            "lease_options": [],
            "removal_fee": "0.00",
            "purchase_price": "0.00",
            "pos_description": "Thule yepp kinderzitje nexxt maxi bagagedrager vib",
            "brand": "THULE",
            "promo_salesprice": "0.00",
            "promo_startdate": null,
            "promo_enddate": null,
            "sales_text": "",
            "custom_variable_1": null,
            "custom_variable_2": null,
            "custom_variable_3": null,
            "custom_variable_4": null,
            "custom_variable_5": null,
            "custom_variable_6": "",
            "images": [
                {
                    "date_modified": "12-02-2019 11:03:31",
                    "url_thumb": "http://s02.cyclesoftware.nl/app/img/Y/artPic_public_T_1741674.jpg",
                    "url_large": "http://s02.cyclesoftware.nl/app/img/Y/artPic_public_L_1741674.jpg"
                }
            ],
            "product_group_main": "O&A",
            "product_group_sub": "Kinderzitjes",
            "product_group_sub_sub": "Kinderzitje achter",
            "product_group_id": "2_D_2",
            "product_pos_group_id": "21",
            "article_location": null,
            "supplier_data": [
                [
                    "7967511",
                    "THULE",
                    "5285",
                    "12080205",
                    "0091021578005",
                    "THULE",
                    "Yepp Nexxt Maxi Universal Mount Vibrant Orange",
                    "",
                    "Yepp Nexxt Maxi Universal Mount Vibrant Orange",
                    "",
                    "0.00",
                    "H",
                    "139.95",
                    "0",
                    "21",
                    "O&A",
                    "Kinderzitjes",
                    "Kinderzitje achter",
                    null,
                    null,
                    "",
                    "1",
                    "1",
                    "COURANT",
                    "1",
                    "",
                    "ZITJE",
                    {
                        "36": "3.73",
                        "37": "2.70",
                        "43": "\"Lichtgewicht en veilig fietszitje voor montage op de bagagedrager met een eigentijds ontwerp dat hoogwaardig comfort voor uw kind biedt.\"",
                        "105": "ZITJE",
                        "131": "https://www.thule.com/nl-nl/nl/child-bike-seats/rear-mounted-child-bike-seats/thule-yepp-nexxt-maxi-_-12080205",
                        "133": [
                            "https://cdn1.static-tgdp.com/ui/productimages/Approved/std.lang.all/44/49/604449_sized_900x600.jpg"
                        ],
                        "137": [
                            "https://cdn1.static-tgdp.com/ui/productimages/Approved/std.lang.all/44/49/604449_sized_900x600.jpg"
                        ],
                        "139": [
                            "https://www.youtube.com/embed/6KGMZFZW58E"
                        ],
                        "142": "Yepp Nexxt Maxi Universal",
                        "143": "Yepp Nexxt Maxi Universal Mount Vibrant Orange",
                        "203": "0.43",
                        "205": "0.89",
                        "206": "0.28",
                        "232": [
                            {
                                "type": "GEBRUIKERS HANDLEIDING",
                                "type_omschrijving": "Gebruikers handleiding",
                                "url": "https://www.thule.com/assetloader.axd?pimid=12080205&id=574173&brand=Thule&market=NL&att=1"
                            }
                        ],
                        "233": [
                            {
                                "type": "SERVICE DOCUMENTATIE",
                                "type_omschrijving": "Service documentatie",
                                "url": "https://www.thule.com/assetloader.axd?pimid=12080205&id=580543&brand=Thule&market=NL&att=1"
                            }
                        ]
                    }
                ],
                [
                    "7996325",
                    "AGU",
                    "1",
                    "130383",
                    "0091021578005",
                    "THULE",
                    "",
                    "Oranje",
                    "Thule yepp kinderzitje nexxt maxi bagagedrager vib",
                    "",
                    "0.00",
                    "H",
                    "139.95",
                    "0",
                    "21",
                    "O&A",
                    "Kinderzitjes",
                    "Kinderzitje achter",
                    null,
                    null,
                    "130383",
                    "0",
                    "0",
                    "VERVALLEN",
                    "0",
                    "",
                    "ZITJE",
                    {
                        "33": "A",
                        "34": "ORANJE",
                        "36": "3.50",
                        "37": "3.00",
                        "43": "Lichtgewicht en veilig fietszitje, voor montage op de bagagedrager, met een eigentijds ontwerp dat hoogwaardig comfort voor uw kind biedt.<b>Specificaties</b>\u2022 Merk: Thule\u2022 Upgrade: nvt\u2022 Introductiejaar: 2017\u2022 Alternatief: Thule Yepp Nexxt\u2022 Kleur: Oranje\u2022 Locatie Fiets: Achter\u2022 Montage: Bagagedrager\u2022 Diameter Bevestiging: nvt\u2022 Inhoud Pakket: Compleet FietszitjeVoor alle specificaties, kijk onderaan de pagina.<b>USP</b>- Maximaal comfort voor uw kind en een veilige en goede pasvorm dankzij de verstelbare, vijfpuntsgordel met zachte schouderpads - Biedt uw kind een soepele rit in het zachte en schokabsorberende zitje - Lichtgewicht maar robuust zitje waarin een harde buitenkant wordt gecombineerd met een zachte zitting voor optimaal comfort voor het kind - Zet uw kind zeer snel, gemakkelijk en handig vast met de magnetische kindveilige gesp - Gemak en flexibiliteit zijn verzekerd naarmate ...",
                        "105": "ZITJE",
                        "137": [
                            "http://www.abcb2b.eu/afbeelding.aspx?a=130383&t=jpgextra"
                        ],
                        "140": "Oranje",
                        "142": "ORANJE Zitje",
                        "143": "Thule yepp kinderzitje nexxt maxi bagagedrager vib"
                    }
                ]
            ]
        },
        {
            "modified_at": "08-03-2021",
            "barcode": "0193751005308",
            "parent_barcode": null,
            "is_bicycle": false,
            "bicycle_id": null,
            "has_stock": false,
            "is_discontinued": false,
            "salesprice": "39.90",
            "rrp": "39.90",
            "lease_options": [],
            "removal_fee": "0.00",
            "purchase_price": "0.00",
            "pos_description": null,
            "brand": "TANNUS",
            "promo_salesprice": "0.00",
            "promo_startdate": null,
            "promo_enddate": null,
            "sales_text": "",
            "custom_variable_1": null,
            "custom_variable_2": null,
            "custom_variable_3": null,
            "custom_variable_4": null,
            "custom_variable_5": null,
            "custom_variable_6": "",
            "images": [],
            "product_group_main": "O&A",
            "product_group_sub": "Banden",
            "product_group_sub_sub": "Banden accessoires en onderdelen",
            "product_group_id": "2_A_3",
            "product_pos_group_id": "21",
            "article_location": null,
            "supplier_data": [
                [
                    "9650393",
                    "GRANSIERBV",
                    "7069",
                    "30129528",
                    "0193751005308",
                    "TANNUS",
                    "",
                    "Rood",
                    "Armour 3 in 1 fietsband anti-lek systeem 28 x 1.65",
                    "28\"",
                    "0.00",
                    "H",
                    "39.90",
                    "0",
                    "21",
                    "O&A",
                    "Banden",
                    "Banden accessoires en onderdelen",
                    null,
                    null,
                    "30129528",
                    "1",
                    "1",
                    "COURANT",
                    "1",
                    "",
                    "VELGLINT",
                    {
                        "34": "ROOD",
                        "43": "Rij sneller en met meer vertrouwen met het Armour anti-lek systeem van Tannus. Deze extra beschermlaag wordt tussen de binnen- en buitenband geplaatst. Herbruikbaar Eenvoudige montage tussen band en binnenband Hogere grip en lagere rolweerstand Heel licht All-round anti-lekbescherming Universeel voor de bandengrootte 28x 1.65 - 1.85, 42/47-700. De aanbevolen binnenbandgrootte is 28/40-622. Past in de velgmaten 19/25-622.",
                        "105": "VELGLINT",
                        "131": "https://www.gransier.nl/nl/tannus-armour-3-in-1-fietsband-anti-lek-systeem-28-x-1-65-1-85-700-x-42-47c",
                        "133": null,
                        "140": "Rood",
                        "141": "28\"",
                        "142": "Armour 3 in 1 fietsband",
                        "143": "Armour 3 in 1 fietsband anti-lek systeem 28 x 1.65"
                    }
                ]
            ]
        }
    ]
}

Articledata definitions

Use /app/api/v3/articledata/definition/ and /app/api/groups/ for more information about possible field values.

GET
/app/api/v3/articledata/definition/
GET
/app/api/groups/

Main object

Element Description
error boolean
error_message Error message description
results Number of results (max 750)
next_result_set Next result set url e.g. /load/ci_app/api/article_data/750-750-0
supplier_data_columns Definition of fields used in supplier_data element

Data object

Property Description Length
barcode Article barcode (alpha numeric) 20
parent_barcode 20
is_bicycle Boolean article is bicycle
bicycle_id Multiple unique bicycle identifiers 0..*
salesprice Price without promo decimal string
has_stock Boolean, if true there is stock for this article at supplier
is_discontinued Boolean, whether the article is marked by dealer as discontinued
rrp Recommended Retail Price decimal string
lease_options Array of objects with lease option
removal_fee The default removal fee for elo bikes decimal string
pos_description Description used in POS and Invoices 255
brand Brand name 30
promo_salesprice Promo price decimal string
promo_startdate yyyy-mm-dd hh:mm:ss 19
promo_enddate yyyy-mm-dd hh:mm:ss 19
sales_text Product description 10000
custom_variable_1 Custom defined variable 100
custom_variable_2 Custom defined variable 100
custom_variable_3 Custom defined variable 100
custom_variable_4 Custom defined variable 100
custom_variable_5 Custom defined variable 100
images Object with image urls see images object
product_group_main DST main group description 40
product_group_sub DST sub group description 40
product_group_sub_sub DST sub sub group description 80
product_group_id DST group code 8
product_pos_group_id POS sales group see request /load/ci_app/api/groups 1 = new product 20 = used product
supplier_data Supplier data object, the field columns are defined in the supplier_data_columns column 0..*

Lease option object

Property Description Type
type b2b or b2c String
platform Name of the lease platform e.g. “cyclelease” String
rrp RRP used to calculate the fee Decimal string
duration_months Contract length Integer
fee_monthly_ex_vat The estimated base lease fee ex vat Decimal string
service Services included Array of strings
options Additional selectable options with description and fee_monthly_ex_vat for each option Array of object with elements description and fee_monthly_ex_vat

Images object

Property Description Length
date_modified dd-mm-yyyy hh:mm:ss 19
url_thumb url to thumb image 100
url_large url to large image 100

Supplier_data object

Property Description
reference ID of article, or reference to bicycle
supplier_name Supplier name
supplier_id Supplier id (see groups api)
article_id Article code
barcode Barcode (ean, upc or string)
brand Brand name
model Model name
color Color
pos_description Description used in POS
size Size
purchase_price Purchase price (= null)
vat_code Code: H, L, G
rrp Recommended retail price
model_year Year of model
product_pos_group_id Group id of POS group (see groups api)
main_group DST main group
sub_group DST sub group
sub_sub_group DST subsub group
supplier_sub_group Supplier groupname
supplier_subsub_group Supplier sub groupname
order_code Order code, see also article_id
order_quantity Quantity in which it is ordered at supplier
min_order_quantity Minimal order quantity for order to supplier
status_code Status code (current = COURANT)
package_contents_quantity If multiple items in package
customer_group Customer group name (Heren, Dames etc)
keyword Key description word (e.g. FIETS)
basic_color Basic color description
primary_color Basic color description
secundary_basic_color Secundary color description
weight_bruto Weight kg
weight_netto Weight net kg
description Description of product
wheelsize Wheelsize in inch
frametype Frametype (e.g. HEREN, DAMES)
framesize Framesize in cm
framesize_description Framesize description
material Frame material
brand_gearsystem_rear Brand of gear rear
model_gearsystem_rear Model of gear rear
type_gearsystem_rear Type of gear rear
gears Number of gears
brand_primary_brake_system_rear Brand of primary brake rear
type_primary_brake_system_rear Type of primary brake rear
model_primary_brake_system_rear Model of primary brake rear
brand_secondary_brake_system_rear Brand of secondary brake rear
type_secondary_brake_system_rear Type of secondary brake rear
model_secondary_brake_system_rear Model of secondary brake rear
brand_brake_system_front Brand of primary brake front
model_brake_system_front Type of primary brake front
type_brake_system_front Model of primary brake front

Stock

Access stock data

Authentication mechanism

Stockinfo

Get stock-info for a set of barcodes. The max number of barcodes is 10. If more are supplied remote supplier stock is not included.

GET
/app/api/v3/stockinfo/:barcode1/:barcode2/../../
GET parameter Type Description
only_supplier_stock integer if 1 stock in stores is ignored optional
only_supplier_id integer If supplied only the stock of this supplier is checked optional
remote_supplier_check integer If 0, no remote supplier checks are performed optional

Properties

Property Type Nullable Description
error boolean false e.g. false
error_message string false Error message if error is true
data.result_items array false array of result objects
data.result_items[].barcode string false e.g. 4026495856010
data.result_items[].stock_available boolean false if true, there is stock available within stores
data.result_items[].delivery_date date true expected delivery date from supplier or back-orders / expected stock
data.result_items[].delivery_date_backlog date true expected delivery date based on back-orders or expected stock
data.result_items[].stock_supplier boolean true true if supplier has stock, false if supplier has no stock, null if not checked
data.result_items[].stock_quantity integer false quantity available in stores
data.result_items[].stock_stores array false info per store
data.result_items[].stock_stores[].dealer_id integer false store number 1
data.result_items[].stock_stores[].store_name string false Name of the store test
data.result_items[].stock_stores[].store_phone string false Phone of the store 0733030050
data.result_items[].stock_stores[].quantity integer false quantity available including demo 0
data.result_items[].stock_stores[].quantity_demo integer false Quantity of demo models
data.result_items[].stock_stores[].quantity_expected integer false Quantity expected from supplier
data.result_items[].stock_stores[].delivery_dates string[] false Delivery dates expected from supplier.
If back-orders are available the date of back-order will be used.
If objects are not assigned to a back-order and have a delivery date this date will be used
data.result_items[].article_id string false Article ID in request url

HTTP request

GET /app/api/v3/stockinfo/4026495856010/4026495843614/ HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 1574

{
    "error": false,
    "error_message": "",
    "data": {
        "result_items": [
            {
                "barcode": "4026495843614",
                "stock_available": true,
                "delivery_date": null,
                "stock_supplier": null,
                "stock_quantity": 3,
                "stock_stores": [
                    {
                        "dealer_id": 1,
                        "store_name": "test",
                        "store_phone": "0733030050",
                        "quantity": 3,
                        "quantity_demo": 0,
                        "quantity_expected": 0,
                        "delivery_dates": []
                    }
                ],
                "article_id": "4026495843614"
            },
            {
                "barcode": "4026495843690",
                "stock_available": true,
                "delivery_date": "01-01-2022",
                "delivery_date_backlog": "01-01-2022",
                "stock_supplier": null,
                "stock_quantity": 3,
                "stock_stores": [
                    {
                        "dealer_id": 1,
                        "store_name": "test",
                        "store_phone": "0733030050",
                        "quantity": 3,
                        "quantity_demo": 0,
                        "quantity_expected": 1,
                        "delivery_dates": [
                            "01-01-2022"
                        ]
                    }
                ],
                "article_id": "4026495843614"
            },
            {
                "barcode": "4026495856010",
                "stock_available": true,
                "stock_quantity": 0,
                "delivery_date": null,
                "stock_supplier": true,
                "stock_stores": [
                    {
                        "dealer_id": 1,
                        "store_name": "test",
                        "store_phone": "0733030050",
                        "quantity": 0,
                        "quantity_demo": 0,
                        "quantity_expected": 0,
                        "delivery_dates": []
                    }
                ],
                "article_id": "4026495856010"
            }
        ]
    }
}

Stock list

Get a list of stocked objects with status available or pro-forma sold.

HTTP request examples

GET
/api/v1/stock/pos-items.json

Properties

Property Type Nullable Description
error boolean false e.g. false
error_message null true
data array false
data[].account_id integer false Account ID of store e.g. 1
data[].store_id integer false ID of the POS store e.g. 1
data[].object_id integer false POS Object ID e.g. 22952
data[].sales_order_id integer false POS order id e.g. 0
data[].brand_name string false Brand name e.g. ZNEN
data[].article_id string false Article number e.g. 787-25646
data[].barcode string false Barcode e.g. 2200082836636
data[].description string false Object brand + model e.g. ZNEN Scooter 8N 20"
data[].frame_id string false Framenumber e.g. FR121212
data[].purchase_price_cents integer false Purchase price cents e.g. 205800
data[].dealer_rrp_cents integer false RRP cents e.g. 349900
data[].is_sold_to_customer boolean false Sold indicator e.g. true
data[].is_demo boolean false Demo indicator e.g. false
data[].is_used boolean false Used indicator e.g. false
data[].has_invoice boolean false Has an invoice e.g. true
data[].stocked_at date true Date of stocking e.g. 2019-01-24
data[].custom_variable_1 string false Custom variable e.g. Some value
data[].is_deleted boolean false Is deleted indicator e.g. false

Response

{
  "error": false,
  "error_message": null,
  "data": [
    {
      "account_id": 1,
      "store_id": 1,
      "object_id": 21016,
      "sales_order_id": 0,
      "supplier": "Votani",
      "article_id": "99.Y2634.Q14",
      "barcode": "2200054202292",
      "description": "Votani X2 Mid Motor",
      "frame_id": "",
      "purchase_price_cents": 0,
      "dealer_rrp_cents": 130000,
      "is_sold_to_customer": true,
      "is_demo": false,
      "is_used": false,
      "has_invoice": true,
      "stocked_at": "2015-11-25",
      "custom_variable_1": "",
      "is_deleted": false
    },
    {
      "account_id": 1,
      "store_id": 1,
      "object_id": 22952,
      "sales_order_id": 0,
      "supplier": "ZNEN",
      "article_id": "787-25646",
      "barcode": "2200082836636",
      "description": "ZNEN Scooter 8N 20\"",
      "frame_id": "",
      "purchase_price_cents": 205800,
      "dealer_rrp_cents": 349900,
      "is_sold_to_customer": true,
      "is_demo": false,
      "is_used": false,
      "has_invoice": true,
      "stocked_at": "2019-01-24",
      "custom_variable_1": "",
      "is_deleted": false
    }
  ]
}

Sales

Access sales data

Authentication mechanism

Sales transactions

Get sales transactions within interval of specified date field (max 31 days). By default the book-date is used.

GET
/app/api/salesdata/json/:start_date/:end_date/
GET
/app/api/salesdata/json/:start_date/:end_date/?date_field=datetime_modified
URI parameter Type Description
start_date date end date e.g. 2020-01-01
end_date date end date e.g. 2020-01-01
GET parameter Type Description
date_field string kassadatum (default) interval as booked date
datetime_modified interval as modification dates
factuurdatum interval as invoice proforma date

Pro-forma invoices

Get a list of proforma sales transactions / invoices.

GET
/api/v1/invoices/proforma.json
GET
/api/v1/invoices/proforma.json?offset=1000
GET parameter Type Description
offset integer Pagination offset. optional

HTTP request

GET /api/v1/invoices/unbooked.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 722

{
  "data": [
    {
      "created_at": "2009-10-21 00:00:00",
      "customer_id": 0,
      "modified_at": "2016-06-27 09:12:39",
      "sales_order_id": null,
      "sales_transaction_number": 20171235,
      "store_id": 1,
      "total_amount_cents": 12500,
      "transaction_date": "2009-10-21",
      "unpayed_amount_cents": 12500
    },
    {
      "created_at": "2009-10-21 00:00:00",
      "customer_id": 0,
      "modified_at": "2016-06-27 09:12:39",
      "sales_order_id": null,
      "sales_transaction_number": 20001,
      "store_id": 1,
      "total_amount_cents": 12500,
      "transaction_date": "2009-10-21",
      "unpayed_amount_cents": 12500
    }
  ],
  "pagination": {
    "next_offset": null
  }
}

Sales orders

Get modified orders within date interval (max 31 days)

GET
/api/v2/salesdata/orders.json?modified_start=:modified_start&modified_end=:modified_end
GET
/api/v2/salesdata/orders.json?modified_start=:modified_start&modified_end=:modified_end&offset=:offset&store_id=:store_id
GET parameter Type Description
store_id integer optional store-id
offset integer optional offset, see pagination in result
modified_start date end date e.g. 2020-01-01
modified_end date end date e.g. 2020-01-01
include_deleted boolean If 1 deleted sales orders are included with status_id=CANCELLED
Property Type Nullable Description
data[].account_id integer false CS Account e.g. 1
data[].store_id integer false Store id e.g. 1
data[].sales_order_id integer false Sales order number e.g. 50032
data[].customer_id integer false Customer number 6776
data[].order_type_id integer false Order type id e.g. 6 (see common enum for list)
data[].order_type_text string false Order type name e.g. Reparatie
data[].order_reference_id string false Sales order reference id e.g. 212
data[].order_reference_text string false Sales order reference id text e.g. TXT212
data[].datetime_created datetime false Created at 2019-05-22 13:45:37
data[].datetime_modified datetime false Modified at 2022-04-07 15:03:32
`data[].datetime_preferred_delivery date true Preferred delivery date
data[].status_id integer false Sales order status id e.g. 9 (see common enum for list)
data[].status_text string false Sales order status text e.g. Afgerond (see common enum for list)
data[].cancellation_type_id integer false Cancellation type id e.g. 0 (see common enum for list)
data[].cancellation_description string true Cancellation description (see common enum for list)
data[].has_invoice boolean false If invoiced true
data[].invoice_number integer true Invoice number 20173328
data[].delivery_method_id integer false Delivery method id 0 (see common enum for list)
data[].delivery_method_description string false Delivery method description Afhalen in winkel (see common enum for list)
data[].order_item_id integer false Item id within sales order 0
data[].order_item_status string false Order item status description Geen status (see common enum for list)
data[].assigned_to_customer_id integer false Sales order could be assigned to a different customer (lease) 6776
data[].item_type string false Description of item type Artikelregel (see common enum for list)
data[].barcode string false Barcode of article 8237238723823
data[].object_id integer false ID of linked stock object 0
data[].pos_group_id integer false POS group id 0 (see common enum for list)
data[].quantity integer false Quantity 1
data[].description string false Description of article Tire
data[].gross_unit_price_in_vat_in_cents integer false Gross unit price in cents 9900
data[].unit_discount_in_vat_in_cents integer false Unit discount amount in cents 1000
data[].nett_line_price_in_vat_in_cents integer false Nett line price in cents 8900
data[].vat_amount_cents integer false VAT amount in cents e.g. 1546
data[].vat_percentage decimal false VAT percentage 21
pagination.count integer false Number of items 3
pagination.next_offset integer true If specified call the api again with offset parameter

HTTP request

GET /api/v2/salesdata/orders.json?modified_start=2022-04-01&modified_end=2022-04-15 HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 1655

{
    "data": [
        {
            "account_id": 1,
            "store_id": 1,
            "sales_order_id": 54230,
            "customer_id": 235270570,
            "order_type_id": 6,
            "order_type_text": "Reparatie",
            "order_reference_id": "",
            "order_reference_text": "",
            "datetime_created": "2022-04-13 17:04:00",
            "datetime_modified": "2022-04-13 17:04:00",
            "datetime_preferred_delivery": null,
            "status_id": 2,
            "status_text": "In behandeling",
            "cancellation_type_id": 0,
            "cancellation_description": null,
            "has_invoice": false,
            "invoice_number": 0,
            "delivery_method_id": 0,
            "delivery_method_description": "Afhalen in winkel",
            "order_item_id": 0,
            "order_item_status": "Geen status",
            "assigned_to_customer_id": 235270570,
            "item_type": "Artikelregel",
            "barcode": "",
            "object_id": 0,
            "pos_group_id": 0,
            "quantity": 0,
            "description": "-",
            "gross_unit_price_in_vat_in_cents": 0,
            "unit_discount_in_vat_in_cents": 0,
            "nett_line_price_in_vat_in_cents": 0,
            "vat_amount_cents": 0,
            "vat_percentage": 0
        },
        {
            "account_id": 1,
            "store_id": 1,
            "sales_order_id": 54228,
            "customer_id": 235269158,
            "order_type_id": 6,
            "order_type_text": "Reparatie",
            "order_reference_id": "",
            "order_reference_text": "",
            "datetime_created": "2022-04-13 17:03:15",
            "datetime_modified": "2022-04-13 17:03:15",
            "datetime_preferred_delivery": null,
            "status_id": 2,
            "status_text": "In behandeling",
            "cancellation_type_id": 0,
            "cancellation_description": null,
            "has_invoice": false,
            "invoice_number": 0,
            "delivery_method_id": 0,
            "delivery_method_description": "Afhalen in winkel",
            "order_item_id": 1,
            "order_item_status": "Geen status",
            "assigned_to_customer_id": 235269158,
            "item_type": "Arbeid",
            "barcode": "",
            "object_id": 0,
            "pos_group_id": 2,
            "quantity": 1,
            "description": "Reparatie laag BTW-tarief",
            "gross_unit_price_in_vat_in_cents": 3792,
            "unit_discount_in_vat_in_cents": 0,
            "nett_line_price_in_vat_in_cents": 3792,
            "vat_amount_cents": 313,
            "vat_percentage": 9
        },
        {
            "account_id": 1,
            "store_id": 1,
            "sales_order_id": 54228,
            "customer_id": 235269158,
            "order_type_id": 6,
            "order_type_text": "Reparatie",
            "order_reference_id": "",
            "order_reference_text": "",
            "datetime_created": "2022-04-13 17:03:15",
            "datetime_modified": "2022-04-13 17:03:15",
            "datetime_preferred_delivery": null,
            "status_id": 2,
            "status_text": "In behandeling",
            "cancellation_type_id": 0,
            "cancellation_description": null,
            "has_invoice": false,
            "invoice_number": 0,
            "delivery_method_id": 0,
            "delivery_method_description": "Afhalen in winkel",
            "order_item_id": 2,
            "order_item_status": "Geen status",
            "assigned_to_customer_id": 235269158,
            "item_type": "Artikelregel",
            "barcode": "4026495099707",
            "object_id": 0,
            "pos_group_id": 5,
            "quantity": 1,
            "description": "Schwalbe binnenband 28X1.1/2 SV19",
            "gross_unit_price_in_vat_in_cents": 850,
            "unit_discount_in_vat_in_cents": 0,
            "nett_line_price_in_vat_in_cents": 850,
            "vat_amount_cents": 148,
            "vat_percentage": 21
        }
    ],
    "pagination": {
        "count": 3,
        "next_offset": null
    }
}

Payments

Get payments within date interval (max 31 days)

GET
/api/v1/salesdata/payments.json?start_date=:start_date&end_date=:end_date
GET parameter Type Description
start_date date start date e.g. 2020-01-01
end_date date end date e.g. 2020-01-01
Property Type Nullable Description
customer_id integer true Customer id 332107
invoice_number integer true Invoice number 365259 (may be null for advance payments)
related_to_invoice_number integer true Related to another parent invoice number
sales_order_id integer true Sales order id 476953
ecommerce_reference_text string true Sales order reference text reference_129223
ecommerce_reference_id string true Sales order reference id 129223
payments array false List of payments
payments[].payment_id integer false ID of payment 65444361
payments[].store_id integer false Store id 1
payments[].book_location_id integer false Book location id in POS 1
payments[].method string false Payment method description Contant Creditcard Chip Tegoedbon(nen) Spaarpunten Retour Bank PSP Rembours Ecocheques
payments[].method_id integer false Payment method id 1 (see common enum for list)
payments[].amount_cents integer false Amount of payment in cents 6999
payments[].book_date string false Date booked 01-04-2022 15:31:44
payments[].created_at string false Date created 01-04-2022 15:31:44
psp array false Array of payment service provider information (e.g. PAY.)
psp[].psp_reference string false PSP reference 17232323571X84a7d
psp[].psp_reference_2 string false PSP reference 2 fb9c911850f4edfe214ff3cdfb214dbef9e8e599
psp[].amount_cents integer false Amount of PSP payment 6999

HTTP request

GET /api/v1/salesdata/payments.json?start_date=2022-04-01&end_date=2022-04-15 HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 1655

[
  {
    "customer_id": null,
    "invoice_number": 365075,
    "related_to_invoice_number": null,
    "sales_order_id": null,
    "ecommerce_reference_text": null,
    "ecommerce_reference_id": null,
    "payments": [
      {
        "payment_id": 65423367,
        "store_id": 7,
        "book_location_id": 1,
        "method": "Pin",
        "method_id": 1,
        "amount_cents": 850,
        "book_date": "01-04-2022 10:09:26",
        "created_at": "01-04-2022 10:09:27"
      }
    ],
    "psp": [
      {
        "psp_reference": "1726172361X338a1",
        "psp_reference_2": "4b94747349c0afa0e0f6ec58dcbe717e1b32d7b0",
        "amount_cents": 850
      }
    ]
  },
  {
    "customer_id": 332107,
    "invoice_number": 365259,
    "related_to_invoice_number": null,
    "sales_order_id": 476953,
    "ecommerce_reference_text": "reference_129223",
    "ecommerce_reference_id": "129223",
    "payments": [
      {
        "payment_id": 65423591,
        "store_id": 1,
        "book_location_id": 1,
        "method": "Bank",
        "method_id": 11,
        "amount_cents": 228900,
        "book_date": "01-04-2022 10:14:18",
        "created_at": "01-04-2022 10:14:18"
      },
      {
        "payment_id": 65444361,
        "store_id": 1,
        "book_location_id": 1,
        "method": "Pin",
        "method_id": 1,
        "amount_cents": 6999,
        "book_date": "01-04-2022 15:31:44",
        "created_at": "01-04-2022 15:31:44"
      }
    ],
    "psp": [
      {
        "psp_reference": "17232323571X84a7d",
        "psp_reference_2": "fb9c911850f4edfe214ff3cdfb214dbef9e8e599",
        "amount_cents": 6999
      }
    ]
  }
]

Insurances

Get insurances for objects created within date interval (max 31 days). The information may not be up-to-date with the information known at the insurance company. This information is based on created insurance applications.

GET
/api/v1/stock-objects/insurance/list.json?start_date=:start_date&end_date=:end_date
GET parameter Type Description
start_date date start date e.g. 2020-01-01
end_date date end date e.g. 2020-01-01
Property Type Nullable Description
insurance_id integer false ID of insurance application 1182027
customer_id integer false Customer ID e.g. 334357
created_at date false Date created e.g. 15-04-2022
stock_object_id integer false Stock object ID 786080
insurance_company string false Name of insurance company KING
reference_id integer false Reference ID 0
policy_number integer false Policy Number (if available) 12212
insurance_starting_date date false Start date of the insurance 15-04-2022
description string false Name of the insurance e.g. E-bike Casco Compleet - 3 jaar - Aut. Incasso
policy_costs integer false Costs of the policy in cents 650
insured_amount integer false Insured amount in cents 299900
premium_amount integer false Insurance premium in cents 19895

HTTP request

GET /api/v1/stock-objects/insurance/list.json??start_date=2022-04-01&end_date=2022-04-15 HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 903

[
    {
        "insurance_id": 1168101,
        "customer_id": 317247,
        "created_at": "01-04-2022",
        "stock_object_id": 775832,
        "insurance_company": "UNIGARANT",
        "reference_id": 0,
        "policy_number": 143123238,
        "insurance_starting_date": "01-04-2022",
        "description": "Onbekend",
        "policy_costs": 968,
        "insured_amount": 6300,
        "premium_amount": 5371
    },
    {
        "insurance_id": 1168175,
        "customer_id": 332105,
        "created_at": "01-04-2022",
        "stock_object_id": 781192,
        "insurance_company": "KING",
        "reference_id": 0,
        "policy_number": 0,
        "insurance_starting_date": "01-04-2022",
        "description": "E-bike casco compleet jaarpremie Aut. Incasso",
        "policy_costs": 650,
        "insured_amount": 176900,
        "premium_amount": 7343
    }
]

Suppliers

Create and send supplier orders

Authentication mechanism

Supplier order properties

Properties used in create, get and send endpoints.

Property Type Nullable Create Description
supplier_order_id integer false Supplier order ID 2222
supplier_id integer false X Supplier ID see common suppliers endpoint e.g. 2113
store_id integer false X Store ID within account e.g. 2
order_type_id integer false Order type see common enum supplier_order_types e.g. 1
status_id integer false Order status see common enum supplier_order_status e.g. 0
supplier_comment string false Comment given by supplier e.g. Some text
supplier_reference string false Reference from supplier ref-from-supplier
created_at datetime false Creation date 2022-01-12 12:30:30
items array false Array of order items
items[].supplier_order_item_id integer false Item ID 10012
items[].item_type_id integer false Item type see common enum transaction_item_types e.g. 1
items[].article_id string false X Article Number. ART2
items[].barcode string false X Barcode e.g. BARCODE2
items[].quantity integer false X Quantity ordered e.g. 2
items[].quantity_delivered integer false Quantity delivered e.g. 0
items[].quantity_open integer false Quantity open (not delivered) e.g. 2
items[].supplier_delivery_date date false Delivery date given by supplier e.g. 2022-01-20
items[].supplier_item_reference string false Reference item from supplier e.g. ref-item-1

Create supplier order

Creates a supplier order. To actually dispatch and send the supplier order to the supplier call the send endpoint with the obtained supplier order ID.

POST
/api/v1/supplier/order/

HTTP request

POST /api/v1/supplier/order/ HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8
Content-length: 299

{
    "supplier_id": 2113,
    "store_id": 2,
    "items": [
        {
            "barcode": "87123456789",
            "article_id": "art-no-1",
            "quantity": 1
        },
        {
            "barcode": "87123456790",
            "article_id": "art-no-2",
            "quantity": 2
        }
    ]
}

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 989

{
    "supplier_order_id": 2222,
    "supplier_id": 2113,
    "store_id": 2,
    "order_type_id": 1,
    "status_id": 0,
    "supplier_comment": "Some text",
    "supplier_reference": "ref-from-supplier",
    "created_at": "2022-01-12 12:30:30",
    "items": [
        {
            "supplier_order_item_id": 10010,
            "item_type_id": 1,
            "article_id": "art-no-1",
            "barcode": "87123456789",
            "quantity": 1,
            "quantity_delivered": 0,
            "quantity_open": 1,
            "supplier_delivery_date": null,
            "supplier_item_reference": ""
        },
        {
            "supplier_order_item_id": 10012,
            "item_type_id": 1,
            "article_id": "ART2",
            "barcode": "BARCODE2",
            "quantity": 2,
            "quantity_delivered": 0,
            "quantity_open": 2,
            "supplier_delivery_date": "2022-01-20",
            "supplier_item_reference": "ref-item-1"
        }
    ]
}

HTTP Error Response

HTTP/1.1 400 
Content-type: application/json; charset=utf-8
Content-length: 57

{
    "error": true,
    "error_message": "Bad request"
}

Get supplier order

GET
/api/v1/supplier/order/:id.json

HTTP request

GET /api/v1/supplier/order/2222.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 989

{
    "supplier_order_id": 2222,
    "supplier_id": 2113,
    "store_id": 2,
    "order_type_id": 1,
    "status_id": 0,
    "supplier_comment": "Some text",
    "supplier_reference": "ref-from-supplier",
    "created_at": "2022-01-12 12:30:30",
    "items": [
        {
            "supplier_order_item_id": 10010,
            "item_type_id": 1,
            "article_id": "art-no-1",
            "barcode": "87123456789",
            "quantity": 1,
            "quantity_delivered": 0,
            "quantity_open": 1,
            "supplier_delivery_date": null,
            "supplier_item_reference": ""
        },
        {
            "supplier_order_item_id": 10012,
            "item_type_id": 1,
            "article_id": "ART2",
            "barcode": "BARCODE2",
            "quantity": 2,
            "quantity_delivered": 0,
            "quantity_open": 2,
            "supplier_delivery_date": "2022-01-20",
            "supplier_item_reference": "ref-item-1"
        }
    ]
}

Send supplier order

Send a supplier order.

POST
/api/v1/supplier/order/:id/send.json

HTTP request

POST /api/v1/supplier/order/2222.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 989

{
    "supplier_order_id": 2222,
    "supplier_id": 2113,
    "store_id": 2,
    "order_type_id": 1,
    "status_id": 1,
    "supplier_comment": "Some text",
    "supplier_reference": "ref-from-supplier",
    "created_at": "2022-01-12 12:30:30",
    "items": [
        {
            "supplier_order_item_id": 10010,
            "item_type_id": 1,
            "article_id": "art-no-1",
            "barcode": "87123456789",
            "quantity": 1,
            "quantity_delivered": 0,
            "quantity_open": 1,
            "supplier_delivery_date": null,
            "supplier_item_reference": ""
        },
        {
            "supplier_order_item_id": 10012,
            "item_type_id": 1,
            "article_id": "ART2",
            "barcode": "BARCODE2",
            "quantity": 2,
            "quantity_delivered": 0,
            "quantity_open": 2,
            "supplier_delivery_date": "2022-01-20",
            "supplier_item_reference": "ref-item-1",
        }
    ]
}

HTTP Error Response

HTTP/1.1 400 
Content-type: application/json; charset=utf-8
Content-length: 57

{
    "error": true,
    "error_message": "Error given by supplier"
}

Rental

Access rental object data

Authentication mechanism

Rental objects

Get a list of objects available for rental fleet.

GET
/api/v1/rental/objects.json

HTTP request

GET /api/v1/rental/objects.json HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 1530

[
    {
        "code": "F1-20297",
        "account_id": 1,
        "article_id": "HT150507",
        "barcode": "8713568237697",
        "store_id": 1,
        "stock_object_id": 20297,
        "is_elo": false,
        "is_moped": false,
        "category_name": "Stadsfietsen",
        "dst_main_id": 1,
        "dst_sub_id": "A",
        "dst_sub_sub_id": 0,
        "is_reserved": false,
        "is_demo": false,
        "is_rental": false,
        "brand_name": "Batavus",
        "frame_type": "Heren",
        "brakes_or_transmission": "",
        "name_brakes": "",
        "object_barcode": "sdgfhdskfvgsil",
        "model_name": "BLOCKBUSTER",
        "color": "Zwart mat",
        "gears": "7",
        "year_description": "2015",
        "size": "",
        "frame_height": "50",
        "wheel_size": "28",
        "frame_size_supplier": "",
        "tyre_size": "",
        "customer_group": "Heren",
        "material_description": "Aluminium",
        "basic_color": "Zwart",
        "basic_color_secondary": "",
        "frame_number": "",
        "chip_number": "",
        "lock_number": "",
        "key_number": "",
        "license_plate_number": "licence_plate",
        "engine_number": "",
        "battery_number": "",
        "images": [
            {
                "date_modified": "2021-01-01T12:00:99",
                "url_thumb": "https://s01.cyclesoftare.nl/link-to-thumb-image.jpg",
                "url_large": "https://s01.cyclesoftare.nl/link-to-image.jpg"
            }
        ]
    }
]

Workshop

Access workshop related data

Authentication mechanism

Service items

Get list of service items for workshop.

GET
/api/v1/workshop/repair-objects/service-items.json
GET
/api/v1/workshop/repair-objects/service-items.json?modified_start=:modified_start&modified_end=:modified_end&offset=:offset
GET parameter Type Description
modified_start date end date e.g. 2020-01-01
modified_end date end date e.g. 2020-01-01
offset integer offset (omit or pagination.next_offset)

Limits

See API limits for more information about API rate limiting.

Type Limit Description
minutely-limit default The default minutely limit applies
daily-limit default The default daily limit applies

Properties

Property Type Nullable Description
error boolean false e.g. false
error_message string true if not null the error message
data array false Array of service item objects
data[].service_id integer false ID of service 1790811
data[].service_item_id integer false Iem ID of service item 4823371
data[].service_barcode string false Barcode of service item e.g. DSK-1790811-3
data[].service_status_id integer false Service status see common api service_item_status e.g. 1
data[].invoice_number integer false If positive number, the invoice which triggered creation of this item e.g. 20173208
data[].customer_id integer false ID of customer e.g. 235269422
data[].object_id integer false ID of object e.g. 24136
data[].is_open boolean false true if still open
data[].is_scheduled boolean false true if scheduled in a workshop order
data[].title string false Title e.g. 3e servicebeurt
data[].description string false Description e.g. 3e servicebeurt
data[].gross_unit_price_cents integer false Gross price in cents 6900
data[].unit_discount_amount_cents integer false Discount in cents 0
data[].amount_payed_in_advance_cents integer false Amount payed 0
data[].time_minutes integer false Time in minutes for workshop 60
data[].scheduled_at date false Scheduled for date e.g. 2021-12-22
data[].scheduled_at_km_age integer false Scheduled after X kilometer
data[].modified_at datetime false Modification date time 2020-06-22 10:51:49
pagination.count integer false Count of results
pagination.next_offset integer true null if no next page available, otherwise value for offset GET variable
GET /api/v1/workshop/repair-objects/service-items.json?modified_start=2022-06-01&modified_end=2022-06-25 HTTP/1.1
Host: api.cyclesoftware.nl
Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ=
Accept-encoding: gzip
Accept: application/json
Content-type: application/json; charset=utf-8

HTTP Response

HTTP/1.1 200 
Content-type: application/json; charset=utf-8
Content-length: 2366

{
    "error": false,
    "error_message": null,
    "data": [
        {
            "service_id": 1790811,
            "service_item_id": 4823367,
            "service_barcode": "DSK-1790811-1",
            "service_status_id": 1,
            "invoice_number": 20173208,
            "customer_id": 235269422,
            "object_id": 24136,
            "is_open": true,
            "is_scheduled": false,
            "title": "1e servicebeurt",
            "description": "1e servicebeurt",
            "gross_unit_price_cents": 8800,
            "unit_discount_amount_cents": 6900,
            "amount_payed_in_advance_cents": 0,
            "time_minutes": 30,
            "scheduled_at": "2022-09-22",
            "scheduled_at_km_age": 0,
            "modified_at": "2022-06-22 10:51:49"
        },
        {
            "service_id": 1790811,
            "service_item_id": 4823369,
            "service_barcode": "DSK-1790811-2",
            "service_status_id": 1,
            "invoice_number": 20173208,
            "customer_id": 235269422,
            "object_id": 24136,
            "is_open": true,
            "is_scheduled": false,
            "title": "2e servicebeurt",
            "description": "2e servicebeurt",
            "gross_unit_price_cents": 6900,
            "unit_discount_amount_cents": 3400,
            "amount_payed_in_advance_cents": 0,
            "time_minutes": 30,
            "scheduled_at": "2022-06-22",
            "scheduled_at_km_age": 500,
            "modified_at": "2022-06-22 10:51:49"
        },
        {
            "service_id": 1790811,
            "service_item_id": 4823371,
            "service_barcode": "DSK-1790811-3",
            "service_status_id": 1,
            "invoice_number": 20173208,
            "customer_id": 235269422,
            "object_id": 24136,
            "is_open": true,
            "is_scheduled": false,
            "title": "3e servicebeurt",
            "description": "3e servicebeurt",
            "gross_unit_price_cents": 6900,
            "unit_discount_amount_cents": 0,
            "amount_payed_in_advance_cents": 0,
            "time_minutes": 60,
            "scheduled_at": "2022-12-22",
            "scheduled_at_km_age": 0,
            "modified_at": "2022-06-22 10:51:49"
        }
    ],
    "pagination": {
        "count": 3,
        "next_offset": null
    }
}

Webhooks

Receive updates from CycleSoftware for specific entities.

Webhook request

The payload is a raw POST of a JSON string to your server. Several headers are included:

Header Description
X-CycleSoftware-Delivery Unique UUID of the webhook message. Same value JSON id property
X-CycleSoftware-Event Event name. Same value as JSON event_name property
X-CycleSoftware-Signature HMAC of the payload using your hash secret

Payload structure

Every JSON payload has the same structure. The payload object is different per event.

Property Type Description
id uuid Unique webhook UUID 20c5d026-68b3-11ec-90d6-0242ac120003
account_id integer Account ID CycleSoftware 1
event_name string The event-name e.g. sales_order.created
event_timestamp float Timestamp when the message was created. 1640787926.323
payload object The actual payload of the event

Payload structure

{
  "id": "20c5d026-68b3-11ec-90d6-0242ac120003",
  "account_id": 1,
  "event_name": "event.sub_name",
  "event_timestamp": 1640787926.323,
  "payload": {}
}

Sales orders

Event name Description
sales_order.created Fired when the sales order is created
sales_order.updated Fired when the sales order is updated
sales_order.deleted Fired when the sales order is marked as deleted
sales_order.invoiced Fired when the sales order is invoiced (sales transaction created)

Properties

Property Type Nullable Description
sales_order_id integer false Sales Order ID e.g. 1442
store_id integer false Store ID within account e.g. 1
sales_employee_id integer false Employee ID see common employees e.g. 1619
customer_id integer false Customer ID e.g. 6667
order_type_id integer false Order type ID, see common enum e.g. 3
order_type_text string false Order type text, see common enum Order
order_reference_id string false Order reference ID 12212
order_reference_text string false Order reference text REF12212
datetime_created datetime false Created at e.g. 2013-09-05 12:00:00
datetime_modified datetime false Modified at e.g. 2022-04-20 12:29:23
datetime_preferred_delivery null true Date of preferred delivery e.g. 2022-04-20 or null
datetime_preferred_pickup null true Date of preferred pickup e.g. 2022-04-20 or null
status_id integer false Sales order status id see common enum e.g. 2
status_text string false Sales order status text see common enum e.g. In behandeling
cancellation_type_id integer false Cancellation type id see common enum e.g. 0
cancellation_description null true Cancellation type description see common enum
remarks string false Order remarks Omschrijving 1
has_invoice boolean false True if invoice is associcated with order e.g. false
invoice_number integer false Invoice number if present 0
ship_to_customer boolean false True if should ship to customer false (deprecated)
delivery_method_id integer false Delivery method ID see common enum e.g. 0
delivery_method_description string false Delivery method description see common enum e.g. Afhalen in winkel
shipment_method_description string false Free description of shipment e.g. VERZENDEN
payment_method_description string false Free description of shipment e.g. IDEAL
order_items array false List of order items
order_items[].item_id integer false ID of item within the order e.g. 2
order_items[].item_type_id integer false Item type ID see common enum e.g. 1
order_items[].special_type_id integer false ID if associated object if present e.g. 0
order_items[].quantity integer false Quantity e.g. 1
order_items[].barcode string false Barcode of item e.g. 4008496261628
order_items[].pos_group_id integer false POS group see common enum e.g. 11
order_items[].description string false Description of item e.g. VARTA BATTERIE 12V38MAH V23GA
order_items[].unit_price_in_vat_cents integer false Gross price in cents 225
order_items[].unit_discount_amount_in_vat_cents integer false Unit discount in cents e.g. 0
order_items[].price_in_vat_cents integer false Line price in cents e.g. 225
order_items[].discount_percentage integer false Discount percentage e.g. 0
order_items[].vat_code integer false VAT code see common enum e.g. 2
order_items[].vat_percentage integer false VAT percentage e.g. 21
order_items[].vat_amount_cents integer false VAT amount in cents e.g. 39
order_items[].item_status_id integer false Item status ID see common enum e.g. 0
order_items[].item_status_text string false Item status text see common enum e.g. Geen status
order_items[].unit_work_time_minutes integer false Work time for item in minutes e.g. 0
customer.customer_barcode string false (deprecated) Reference of the customer e.g. REF1212
customer.prefix string false (deprecated) Name prefix e.g. Dhr./Mevr.
customer.country string false (deprecated) Country (deprecated) see country_code_iso_3166 e.g. NL
customer.name_prefix string true (deprecated)
customer.iban string false IBAN bank account
customer.customer_id integer false Customer ID e.g. 6667
customer.customer_type_name string false Customer type see common enum e.g. Klant
customer.customer_reference string false Customer reference e.g. REF1212
customer.postcode string false Postal code e.g. 1000AA
customer.house_number string false Housenumber e.g. 2522
customer.house_number_postfix string false Housenumber postfix e.g. B
customer.attn string false e.g. ``
customer.title string false Title of customer e.g. Dhr./Mevr.
customer.first_name string false Initials e.g. Adri
customer.initials string false Initials e.g. C.G.
customer.insertion string false Name insertion e.g. van
customer.name string false (Sur)name e.g. Wijk
customer.street string false Street name e.g. Aalsburg
customer.city string false City name e.g. Amsterdam
customer.country_code_iso_3166 string false Country code e.g. NL
customer.email string false Customer E-mail e.g. test@test.nl
customer.discount_percentage integer false Default discount percentage e.g. 0
customer.datetime_created string true datetime created if known (null if unknown)
customer.phone_numbers array false array of phone numbers
customer.phone_numbers[].phone_number_id string false ID mob, tel or stringed ID e.g. 10589
customer.phone_numbers[].customer_id integer false Customer ID 6667
customer.phone_numbers[].phone_number string false Phone number 06-12345678
customer.phone_numbers[].name string false Name associated with the phone number e.g. Sjaak
delivery_address object true Delivery address if specified, null if not specified
delivery_address.delivery_address_id integer false Delivery address ID e.g. 91953
delivery_address.customer_id integer false Customer ID e.g. 6667
delivery_address.is_business boolean false If business address true
delivery_address.company_name string false Company name if specified
delivery_address.name string false Name of customer Name 91953
delivery_address.street string false Street name e.g. Slangenburg
delivery_address.housenumber string false House number e.g. 314
delivery_address.housenumber_postfix string false House number postfix B
delivery_address.postcode string false Postcode e.g. 8888ZZ
delivery_address.city string false City Deventer
delivery_address.country string false Deprecated, filled with country code NL
delivery_address.country_code_iso_3166 string false ISO 3166 Country code e.g. NL
delivery_address.phone_number string false Phonenumber associated with address 06 12345678
delivery_address.email string false E-mail associated with address email91953@example.nl
delivery_address.remarks string false Remarks for address Some text
labels array false Array of label strings
labels[] string false Label associated with the sales order e.g. label1

Payload structure

{
  "id": "2f4de380-f2be-4143-bbdf-1174c5d47991",
  "account_id": 1,
  "event_name": "sales_order.updated",
  "event_timestamp": 1650450563.309,
  "payload": {
    "sales_order_id": 1442,
    "store_id": 1,
    "sales_employee_id": 1619,
    "customer_id": 6667,
    "order_type_id": 3,
    "order_type_text": "Order",
    "order_reference_id": "",
    "order_reference_text": "",
    "datetime_created": "2013-09-05 12:00:00",
    "datetime_modified": "2022-04-20 12:29:23",
    "datetime_preferred_delivery": null,
    "datetime_preferred_pickup": null,
    "status_id": 2,
    "status_text": "In behandeling",
    "cancellation_type_id": 0,
    "cancellation_description": null,
    "remarks": "Omschrijving 1",
    "has_invoice": false,
    "invoice_number": 0,
    "ship_to_customer": false,
    "delivery_method_id": 0,
    "delivery_method_description": "Afhalen in winkel",
    "shipment_method_description": "",
    "payment_method_description": "",
    "order_items": [
      {
        "item_id": 1,
        "item_type_id": 1,
        "special_type_id": 0,
        "quantity": 1,
        "barcode": "8715434065984",
        "pos_group_id": 11,
        "description": "BOBAG BOBIKE ROZE MOTIEF PRETTY PEONI (BLAUW)",
        "unit_price_in_vat_cents": 5995,
        "unit_discount_amount_in_vat_cents": 0,
        "price_in_vat_cents": 5995,
        "discount_percentage": 0,
        "vat_code": 2,
        "vat_percentage": 21,
        "vat_amount_cents": 1040,
        "item_status_id": 0,
        "item_status_text": "Geen status",
        "unit_work_time_minutes": 0
      },
      {
        "item_id": 2,
        "item_type_id": 1,
        "special_type_id": 0,
        "quantity": 1,
        "barcode": "4008496261628",
        "pos_group_id": 11,
        "description": "VARTA BATTERIE 12V38MAH V23GA",
        "unit_price_in_vat_cents": 225,
        "unit_discount_amount_in_vat_cents": 0,
        "price_in_vat_cents": 225,
        "discount_percentage": 0,
        "vat_code": 2,
        "vat_percentage": 21,
        "vat_amount_cents": 39,
        "item_status_id": 0,
        "item_status_text": "Geen status",
        "unit_work_time_minutes": 0
      }
    ],
    "customer": {
      "customer_barcode": "",
      "prefix": "Dhr./Mevr. ",
      "country": "",
      "name_prefix": null,
      "iban": "",
      "customer_id": 6667,
      "customer_type_name": "Klant",
      "customer_reference": "",
      "postcode": "1000AA",
      "house_number": "2522",
      "house_number_postfix": "",
      "attn": "",
      "title": "Dhr./Mevr. ",
      "first_name": "Carlo",
      "initials": "C.G.",
      "insertion": "van",
      "name": "Wijk",
      "street": "Aalsburg",
      "city": "Amsterdam",
      "country_code_iso_3166": "",
      "email": "test@test.nl",
      "discount_percentage": 0,
      "datetime_created": null,
      "phone_numbers": [
        {
          "phone_number_id": "mob",
          "customer_id": 6667,
          "phone_number": "",
          "name": "Dhr./Mevr. C.G. van Wijk"
        },
        {
          "phone_number_id": "tel",
          "customer_id": 6667,
          "phone_number": "000-1231231",
          "name": "Dhr./Mevr. C.G. van Wijk"
        },
        {
          "phone_number_id": "10589",
          "customer_id": 6667,
          "phone_number": "06-12345678",
          "name": "Sjaak"
        }
      ]
    },
    "delivery_address": {
      "delivery_address_id": 91953,
      "customer_id": 6667,
      "is_business": false,
      "company_name": "",
      "name": "Name 91953",
      "street": "Slangenburg",
      "housenumber": "314",
      "housenumber_postfix": "B",
      "postcode": "8888ZZ",
      "city": "Deventer",
      "country": "NL",
      "country_code_iso_3166": "NL",
      "phone_number": "06 12345678",
      "email": "email91953@example.nl",
      "remarks": "Some text"
    },
    "labels": ["label1"]
  }
}

Workshop orders

Event name Description
workshop_order.created Fired when the workshop order / repair is created
workshop_order.updated Fired when the workshop order / repair is updated
workshop_order.deleted Fired when the workshop order / repair is marked as deleted

Properties

Property Type Nullable Description
workshop_order_id integer false Workshop order ID e.g. 50032
repair_object_id integer false Repair object ID e.g. 22534
reference_text string false Reference of order RefText
datetime_scheduled_start datetime false Scheduled start 2019-06-07 14:30:00
datetime_scheduled_finished datetime false Scheduled finished 2019-06-07 16:10:00
mechanic_employee_id integer false Assigned to mechanic see common employees 40899
repair_description string false Description of workshop order Band plakken
status_id integer false Workshop order status ID see common enum e.g. 7
status_text string false Workshop order status see common enum e.g. Reparatie voltooid
borrowed_object_reference string false Reference to borrowed object BORROWEDBIKE1
total_repair_time_minutes integer false Total time of repair in minutes e.g. 100 (Custom time + items)
custom_repair_time_minutes integer false Custom time of repair in minutes e.g. 0
sales_order object false See structure of sales order webhook `

Payload example

{
  "id": "34a9759f-3da7-424c-8bd8-1ce3eb22fce8",
  "account_id": 1,
  "event_name": "workshop_order.updated",
  "event_timestamp": 1649336612.447,
  "payload": {
    "workshop_order_id": 50032,
    "repair_object_id": 22534,
    "reference_text": "RefText",
    "datetime_scheduled_start": "2019-06-07 14:30:00",
    "datetime_scheduled_finished": "2019-06-07 16:10:00",
    "mechanic_employee_id": 40899,
    "repair_description": "Band plakken",
    "status_id": 7,
    "status_text": "Reparatie voltooid",
    "borrowed_object_reference": "",
    "total_repair_time_minutes": 100,
    "custom_repair_time_minutes": 0,
    "sales_order": {
      "sales_order_id": 50032,
      "store_id": 1,
      "sales_employee_id": 1001,
      "customer_id": 6776,
      "order_type_id": 6,
      "order_type_text": "Reparatie",
      "order_reference_id": "12122",
      "order_reference_text": "RefText",
      "datetime_created": "2019-05-22 13:45:37",
      "datetime_modified": "2020-08-12 15:51:57",
      "datetime_preferred_delivery": null,
      "datetime_preferred_pickup": null,
      "status_id": 9,
      "status_text": "Afgerond",
      "cancellation_type_id": 0,
      "cancellation_description": null,
      "remarks": "Opmerking",
      "has_invoice": true,
      "invoice_number": 20173328,
      "ship_to_customer": false,
      "delivery_method_id": 0,
      "delivery_method_description": "Afhalen in winkel",
      "shipment_method_description": "",
      "payment_method_description": "",
      "order_items": [],
      "customer": {
        "customer_barcode": "",
        "prefix": "",
        "country": "NL",
        "name_prefix": null,
        "iban": "",
        "customer_id": 6776,
        "customer_type_name": "Klant",
        "customer_reference": "",
        "postcode": "1000AA",
        "house_number": "1",
        "house_number_postfix": "B",
        "attn": "",
        "title": "",
        "first_name": "Jan",
        "initials": "",
        "insertion": "Van",
        "name": "Wijk",
        "street": "",
        "city": "",
        "country_code_iso_3166": "NL",
        "email": "test@cyclesoftware.nl",
        "discount_percentage": 0,
        "datetime_created": null,
        "phone_numbers": [
          {
            "phone_number_id": "mob",
            "customer_id": 6776,
            "phone_number": "0612345678",
            "name": "Van Wijk"
          },
          {
            "phone_number_id": "226441",
            "customer_id": 6776,
            "phone_number": "0612345679",
            "name": "Extra Richard"
          }
        ]
      },
      "delivery_address": null,
      "labels": ["label1"]
    }
  }
}

Sales transactions / invoices

Event name Description
sales_transaction.created Fired when the sales transaction / invoice is created
sales_transaction.updated Fired when the sales transaction / invoice is updated

Properties

Property Type Nullable Description
invoice_number integer false Sales transaction number / invoice number e.g. 20210048
is_final boolean false True if the transaciton is booked false
customer_id integer false Customer ID e.g. 1006 for anonymous 0
store_id integer false Store ID within account 1
sales_employee_id integer false Employee ID e.g. 1001 see common employees
sales_order_id integer true Sales Order ID
workshop_order_id integer true Workshop Order ID
total_amount_cents integer false Total amount in cents e.g. 278820
unpayed_amount_cents integer false Unpayed amount in cents. 278820
invoice_date date false (pro-forma) date of the invoice 2022-04-29
book_date date true Book date of invoice. null if not booked
sales_items array false Array of sales items
sales_items[].sales_item_id integer false Item identifier 115350527
sales_items[].item_type_id integer false Item type, see common enum .e.g. 1
sales_items[].special_type_id integer false If associated with a stock item this is the stock item id 0
sales_items[].quantity integer false Quantity sold e.g. 1
sales_items[].barcode string false Barcode of the article
sales_items[].pos_group_id integer false POS group id see common enum e.g. 11
sales_items[].description string false Line description Diversen
sales_items[].unit_price_in_vat_cents integer false Gross unit price in cents 9900
sales_items[].unit_discount_amount_in_vat_cents integer false Unit discount amount in cents 990
sales_items[].price_in_vat_cents integer false Line price in cents e.g. 8910
sales_items[].discount_percentage integer false Discount percentage 10
sales_items[].vat_code integer false VAT code, see common enum 2
sales_items[].vat_percentage integer false VAT percentage 21
sales_items[].vat_amount_cents integer false Line vat amount in cents. 1546
sales_items[].identification object true Object with serial numbers if associated
sales_items[].identification.stock_object_id integer false Object associated with the item 24406
sales_items[].identification.frame_number string false Frame number e.g. FR0000010
sales_items[].identification.key_number string false Key number e.g. SL10000
sales_items[].identification.lock_number string false Lock number e.g. K1212
sales_items[].identification.battery_number string false Battery number e.g. B12122112
sales_items[].identification.engine_number string false Engine number e.g. E3322323
sales_items[].identification.serial_number string false Serial number e.g. S320934
sales_items[].identification.license_plate_number string false License plate number e.g. xx-yy-zz

Payload example

{
  "id": "f65ee643-1010-4ecb-a67e-da50dbe1ed90",
  "account_id": 1,
  "event_name": "sales_transaction.created",
  "event_timestamp": 1651242527.212,
  "payload": {
    "invoice_number": 20210047,
    "is_final": true,
    "customer_id": 0,
    "store_id": 1,
    "sales_employee_id": 1001,
    "sales_order_id": null,
    "workshop_order_id": null,
    "total_amount_cents": 200,
    "unpayed_amount_cents": 0,
    "invoice_date": "2022-04-29",
    "book_date": "2022-04-29",
    "sales_items": [
      {
        "sales_item_id": 115350525,
        "item_type_id": 1,
        "special_type_id": 0,
        "quantity": 1,
        "barcode": "",
        "pos_group_id": 8,
        "description": "Kleding",
        "unit_price_in_vat_cents": 200,
        "unit_discount_amount_in_vat_cents": 0,
        "price_in_vat_cents": 200,
        "discount_percentage": 0,
        "vat_code": 2,
        "vat_percentage": 21,
        "vat_amount_cents": 35,
        "identification": null
      }
    ]
  }
}

Internal deliveries / store orders

Event name Description
store_order.created Will be delivered when store order is created

Payload properties

Property Type Nullable Description
store_order_id integer false internal delivery / store order id e.g. 45287
store_id_from integer false destination store id
dealer_id_from integer false source dealer_id
store_id_to integer false destination store_id
dealer_id_to integer false destination dealer_id
store_order_type string false regulier or via warehouse
store_order_type_id integer false 0: regular, 1: via warehouse
status_id integer false 0: open, 1: processed, 2: cancelled
status string false e.g. Verwerkt
remarks string false e.g. Filiaal naar filiaal levering #2341
processed_at datetime true e.g. 2012-05-25 15:17:00
related_to_sales_order_ids integer[] false List of sales order ids related to delivery
related_to_supplier_order_ids integer[] false List of supplier order ids related to delivery
items array false list of items within store order
items[].store_order_item_id integer false e.g. 2
items[].barcode string false e.g. F.1000
items[].quantity integer false e.g. 1
items[].item_type_id integer false 1: article, 2:object
items[].object_id integer true e.g. 1000 or null
items[].description string false e.g. Fiets

Payload

{
  "id": "20c5d026-68b3-11ec-90d6-0242ac120003",
  "account_id": 1,
  "event_name": "store_order.created",
  "event_timestamp": 1640787926.323,
  "payload": {
    "store_order_id": 45287,
    "store_id_from": 1,
    "dealer_id_from": 1,
    "store_id_to": 2,
    "dealer_id_to": 131073,
    "store_order_type": "regulier",
    "store_order_type_id": 0,
    "status_id": 1,
    "status": "Verwerkt",
    "remarks": "Filiaal naar filiaal levering #2341",
    "processed_at": "2012-05-25 15:17:00",
    "related_to_sales_order_ids": [
      123223
    ],
    "related_to_supplier_order_ids": [
      2443
    ],
    "items": [
      {
        "store_order_item_id": 2,
        "barcode": "1000",
        "quantity": 1,
        "item_type_id": 1,
        "object_id": null,
        "description": "Artikel"
      },
      {
        "store_order_item_id": 2,
        "barcode": "F.1000",
        "quantity": 1,
        "item_type_id": 2,
        "object_id": 1000,
        "description": "Fiets"
      }
    ]
  }
}