### Voucher Response Example Source: https://docs.cyclesoftware.nl/ Example of a successful HTTP response when retrieving voucher details. ```json { "error": false, "error_message": null, "data": { "code": "1000-2000-3000-4000", "type_id": 1, "type_description": "Waardebon", "is_active": true, "amount_initial_cents": 2000, "amount_spent_cents": 1500, "amount_balance_cents": 500 } } ``` -------------------------------- ### Get Workshop Assemblies (Basic) Source: https://docs.cyclesoftware.nl/warehouse.html Retrieves a list of stock items released for shipment within a specified date range. Requires start and end dates. ```http GET /api/v1/warehouse/workshop/assemblies.json?start_date=:start_date&end_date=:end_date ``` -------------------------------- ### HTTP GET Request for Properties Source: https://docs.cyclesoftware.nl/ Use this GET request to retrieve property definitions, including their types, descriptions, and example values. Ensure to include your authorization credentials. ```http GET /api/v4/articledata/properties.json HTTP/1.1 Host: api.cyclesoftware.nl Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ= Accept-encoding: gzip Accept: application/json ``` -------------------------------- ### Example HTTP Response from Supplier API Source: https://docs.cyclesoftware.nl/supplier.html This is an example of a successful HTTP response from the supplier API, detailing available spare parts. ```http HTTP/1.1 200 Content-type: application/json Content-length: 1853 { "ArticleNumber": "04507783", "items": [ [ { "GroupDescription": "E-bike componenten", "SparePartArticleNumber": "64622045", "EAN": "87832823823", "Quantity": 1, "Description": "EBP WIEL V 28 ION MMU2 V2 33NM APP ST 650MM RIG ZI", "ArticleNumberOEM": null, "NettPurchasePrice": 222.99 }, { "GroupDescription": "Frame", "SparePartArticleNumber": "35135142", "EAN": "87832823824", "Quantity": 1, "Description": "Voorvork", "ArticleNumberOEM": null, "NettPurchasePrice": 223.99 }, { "group_description": "E-bike componenten", "SparePartArticleNumber": "39145603", "EAN": "87832823825", "Quantity": 1, "Description": "KETTINGSPANNER TMM-A V2", "ArticleNumberOEM": null, "NettPurchasePrice": 227.99 }, { "group_description": "E-bike componenten", "article_id": "24358017", "EAN": "87832823826", "Quantity": 1, "Description": "VULBUS RVS FRONTMOTOR L", "ArticleNumberOEM": "3823021", "NettPurchasePrice": 227.99 }, { "group_description": "E-bike componenten", "article_id": "29111490", "EAN": "87832823827", "Quantity": 1, "Description": "BATTERIJ PAKKET ION-300 PMU4 SERIES ZILVER", "ArticleNumberOEM": "3823023", "NettPurchasePrice": 227.99 } ] ] } ``` -------------------------------- ### Example HTTP Request to Supplier API Source: https://docs.cyclesoftware.nl/supplier.html Use this example to send a POST request to the supplier API for spare parts. Ensure the Content-type header is correctly set. ```http POST /supplier/api/spareparts/ HTTP/1.1 Host: api.supplier.com Accept: application/json Content-type: application/json; charset=utf-8 { "ArticleNumber": "04507783", "FrameNumber": null } ``` -------------------------------- ### Customer Find Response Example Source: https://docs.cyclesoftware.nl/ This is an example of a successful HTTP response when finding a customer. It returns an array of customer objects, each containing detailed information. ```json HTTP/1.1 200 Content-type: application/json; charset=utf-8 Content-length: 44656 X-RateLimit-Minutely-Limit: 360 X-RateLimit-Minutely-Remaining: 59 X-RateLimit-Daily-Limit: 15000 X-RateLimit-Daily-Remaining: 14999 X-RateLimit-Daily-Reset: 1678230000 [ { "customer_id": 8, "customer_type_name": "Klant", "customer_reference": "REF46", "postcode": "8448PE", "house_number": "32", "house_number_postfix": "B", "company_name": "", "attn": "", "title": "Dhr.", "initials": "A", "insertion": "Van", "first_name": "Adri", "name": "Name 235238848", "street": "Mauritslaan", "city": "Heerenveen", "country_code_iso_3166": "NL", "email": "test235238848@cyclesoftware.nl", "vat_number": "", "coc_number": "", "discount_percentage": 0, "datetime_created": null, "phone_numbers": [ { "phone_number_id": "mob", "customer_id": 8, "phone_number": "0733030050", "name": "Adri Van Name 235238848" }, { "phone_number_id": "tel", "customer_id": 8, "phone_number": "", "name": "Adri Van Name 235238848" }, { "phone_number_id": "453383", "customer_id": 8, "phone_number": "06 24238848", "name": "Extra 1" } ] }, { "customer_id": 11, "customer_type_name": "E-commerce", "customer_reference": "REFBE1", "postcode": "1000", "house_number": "2", "house_number_postfix": "B", "attn": "", "title": "Dhr.", "initials": "G", "insertion": "van", "first_name": "Giel", "name": "Wijgergangs", "street": "Belgische weg", "city": "Belgcity", "country_code_iso_3166": "BE", "email": "gielwijgergangs@example.com", "vat_number": "", "coc_number": "", "discount_percentage": 0, "datetime_created": null, "phone_numbers": [ { "phone_number_id": "mob", "customer_id": 11, "phone_number": "06 22903913", "name": "Giel van Wijgergangs" }, { "phone_number_id": "tel", "customer_id": 11, "phone_number": "073 303 0050", "name": "Giel van Wijgergangs" } ] } ] ``` -------------------------------- ### JSON Pagination Response Example Source: https://docs.cyclesoftware.nl/platform.html Example of a JSON response that includes pagination information, indicating the next offset for retrieving further data. ```json { "error": false, "error_message": null, "data": [], "pagination": { "next_offset": 1000 } } ``` -------------------------------- ### Workshop Assemblies Response Example Source: https://docs.cyclesoftware.nl/warehouse.html Example JSON response structure for the workshop assemblies endpoint, detailing stock item information and release status. ```json { "error": false, "error_message": null, "data": [ { "stock_item_id": 10000, "is_assembled": true, "released_by": "Name 11", "scheduled_for_release_at": "2021-10-10", "released_for_shipment_at": "2021-10-11", "claimed_by_dealer_id": 5393, "outbound_order_id": 10001, "outbound_order_item_id": 10002, "outbound_shipment_id": 10003, "outbound_shipment_item_id": 10004, "is_sold_to_customer": true }, { "stock_item_id": 20000, "is_assembled": false, "released_by": "Name 12", "scheduled_for_release_at": "2021-10-10", "released_for_shipment_at": "2021-10-11", "claimed_by_dealer_id": 5393, "outbound_order_id": 20001, "outbound_order_item_id": 20002, "outbound_shipment_id": 20003, "outbound_shipment_item_id": 20004, "is_sold_to_customer": false } ], "pagination": { "next_offset": null } } ``` -------------------------------- ### Get Workshop Assemblies (Paginated) Source: https://docs.cyclesoftware.nl/warehouse.html Retrieves a list of stock items released for shipment within a specified date range, with optional pagination. Requires start and end dates, and an offset for pagination. ```http GET /api/v1/warehouse/workshop/assemblies.json?start_date=:start_date&end_date=:end_date&offset=:offset ``` -------------------------------- ### Batch Update Stock Objects Response Example Source: https://docs.cyclesoftware.nl/ This is an example of a successful HTTP response to a batch stock object update request. It includes results for each updated item, indicating success or failure. ```json HTTP/1.1 200 Content-type: application/json; charset=utf-8 Content-length: 19744 { "results": [ { "stock_object_id": 26042, "result": "success", "object": { "stock_object_id": 26042, "is_reserved": false, "is_demo": false, "object_reference": "", "barcode": "3323", "article_id": "0298", "brand_name": "Batavus", "brand_id": 1759, "model_name": "New model name", "article_main_group": 1, "article_group": "B", "article_sub_group": 1, "frame_type": "WOMEN", "model_year": 2025, "frame_height": 53, ``` -------------------------------- ### Inbound Backlog Response Example Source: https://docs.cyclesoftware.nl/warehouse.html This is an example of a successful response when fetching inbound backlog items. It includes error status, messages, and an array of backlog item data, along with pagination details. ```json { "error": false, "error_message": null, "data": [ { "id": 412805, "supplier_id": 2403, "is_sold_to_customer": false, "in_transit": false, "article_id": "LV105", "barcode": "8719812004282", "supplier_reference": "7171648", "supplier_reference_2": "7171648", "delivery_date": "2022-11-07", "original_delivery_date": "2022-11-14", "external_remarks": "", "internal_remarks": "some text", "created_at": "2022-04-21 12:15:56", "modified_at": "2022-04-21 12:18:53", "assignment": null }, { "id": 412843, "supplier_id": 2403, "is_sold_to_customer": false, "in_transit": false, "article_id": "LV106", "barcode": "8719812004299", "supplier_reference": "7171984", "supplier_reference_2": "7171984", "delivery_date": "2022-10-24", "original_delivery_date": "2022-10-31", "external_remarks": "BL-412843", "internal_remarks": null, "created_at": "2022-04-21 12:15:56", "modified_at": "2022-04-21 12:18:53", "assignment": { "assigned_to_entity_type_id": 20, "assigned_to_entity_id": 564840, "outbound_order_id": 440452, "reference": "yourref_138443" } } ], "pagination": { "next_offset": 2 } } ``` -------------------------------- ### Supplier List API Response Example Source: https://docs.cyclesoftware.nl/ Example JSON response for the supplier list API endpoint. It includes details for suppliers, bike brands, and moped brands, with their respective IDs and names. ```json { "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 } ] } ``` -------------------------------- ### Get Trading Hours Source: https://docs.cyclesoftware.nl/ Retrieves workshop trading hours for a specified store and a given number of days. You can also specify a start date. ```APIDOC ## GET /api/v2/workshop/trading-hours.json ### Description Workshop trading hours for default or specific store. ### Method GET ### Endpoint /api/v2/workshop/trading-hours.json ### Parameters #### Query Parameters - **store_id** (integer) - Required - Store ID to get info for. e.g `2` - **day_count** (?integer) - Optional - Number of days to retrieve information for. e.g `3` - **start_date** (?date) - Optional - Start date in results. e.g. `2024-10-03` ``` -------------------------------- ### Get Entity Labels HTTP Request Source: https://docs.cyclesoftware.nl/ Example HTTP request to retrieve labels associated with a specific entity. Requires Basic HTTP Authentication. ```http POST /api/v1/labels/7/51208/get.json HTTP/1.1 Host: api.cyclesoftware.nl Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ= Accept-encoding: gzip Accept: application/json ``` -------------------------------- ### Example API Query Parameter for Pagination Source: https://docs.cyclesoftware.nl/ Shows how to use the 'offset' query parameter to retrieve the next page of results. ```http GET /v1/endpoint?offset=1000 ``` -------------------------------- ### Create Customer Source: https://docs.cyclesoftware.nl/ Creates a new customer. ```APIDOC ## POST /api/v1/customers.json ### Description Create a customer ### Method POST ``` -------------------------------- ### List Customers API Request Source: https://docs.cyclesoftware.nl/ Example HTTP GET request to list customers with a modification date filter. Ensure correct Host and Authorization headers are used. ```http GET /api/v1/customers/list.json?modified_since=2019-01-01%2012:00:00 HTTP/1.1 Host: api.cyclesoftware.nl Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ= Accept-encoding: gzip Accept: application/json Content-type: application/json; charset=utf-8 ``` -------------------------------- ### Get Payments by Date Range Source: https://docs.cyclesoftware.nl/ Retrieve a list of payments within a specified date interval (maximum 31 days). This endpoint requires start and end dates as query parameters. The response includes details for each payment, such as customer ID, invoice number, payment method, amount, and PSP information. ```http 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 ``` ```json 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 } ] } ] ``` -------------------------------- ### Workshop Order Response Example Source: https://docs.cyclesoftware.nl/ This is an example of a successful HTTP 200 response when fetching workshop order details. The response is in JSON format and contains comprehensive information about the order, including customer details, scheduled times, and order items. ```json HTTP/1.1 200 Content-type: application/json; charset=utf-8 Content-length: 2814 X-RateLimit-Minutely-Limit: 360 X-RateLimit-Minutely-Remaining: 59 X-RateLimit-Daily-Limit: 15000 X-RateLimit-Daily-Remaining: 14999 X-RateLimit-Daily-Reset: 1678230000 { "workshop_order_id": 978768, "sales_order_id": 978768, "customer_id": 24, "store_id": 1, "repair_object_id": 1105, "is_active": true, "reference_text": "work_number", "datetime_scheduled_start": "2023-03-07 16:54:23", "datetime_scheduled_finished": "2023-03-07 17:54:23", "datetime_created": "2023-03-07 16:54:23", "datetime_modified": "2023-03-07 16:54:23", "mechanic_employee_id": 12, "created_by_employee_id": 1, "last_update_employee_id": 1, "phone_number_id": "tel", "repair_description": "posted repair", "status_id": 7, "status_text": "Reparatie voltooid", "invoice_number": 0, "borrowed_object_reference": "", "total_repair_time_minutes": 60, "custom_repair_time_minutes": 0, "delivery_method_id": 0, "workshop_order_type_id": 1, "order_items": [ { "item_id": 1, "item_type_id": 4, "special_type_id": 0, "quantity": 1, "barcode": "102", "pos_group_id": 2, "description": "In- en uitbouwen electromotor in- en uitbouwen accu", "unit_price_in_vat_cents": 9000, "unit_discount_amount_in_vat_cents": 0, "price_in_vat_cents": 9000, "discount_percentage": 0, "vat_code": 1, "vat_percentage": 9, "vat_amount_cents": 743, "item_status_id": 0, "item_status_text": "Geen status", "unit_work_time_minutes": 0, "assigned_to_customer_id": 24 }, { "item_id": 2, "item_type_id": 1, "special_type_id": 0, "quantity": 1, "barcode": "102", "pos_group_id": 2, "description": "In- en uitbouwen electromotor in- en uitbouwen accu", "unit_price_in_vat_cents": 9000, "unit_discount_amount_in_vat_cents": 0, "price_in_vat_cents": 9000, "discount_percentage": 0, "vat_code": 1, "vat_percentage": 9, "vat_amount_cents": 743, "item_status_id": 0, "item_status_text": "Geen status", "unit_work_time_minutes": 0, "assigned_to_customer_id": 24 }, { "item_id": 3, "item_type_id": 4, "special_type_id": 0, "quantity": 1, "barcode": "999", "pos_group_id": 2, "description": "Test Title", "unit_price_in_vat_cents": 12000, "unit_discount_amount_in_vat_cents": 0, "price_in_vat_cents": 12000, "discount_percentage": 0, "vat_code": 1, "vat_percentage": 9, "vat_amount_cents": 991, "item_status_id": 0, "item_status_text": "Geen status", "unit_work_time_minutes": 60, "assigned_to_customer_id": 24 } ] } ``` -------------------------------- ### Create New Order with SOAP API Source: https://docs.cyclesoftware.nl/ Use this PHP code to instantiate the SOAP client and prepare the order data for submission. Ensure your authentication details and order information are correctly populated. ```php 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_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' => '', 'customer_vat_number' => '', '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', ``` -------------------------------- ### Get Specific Enum Source: https://docs.cyclesoftware.nl/ Fetch a specific enum by its subject name. This allows you to get detailed descriptions for a particular type, such as 'sales_order_types'. ```HTTP GET /api/v1/common/enum/sales-order-types.json HTTP/1.1 Host: api.cyclesoftware.nl Authorization: Basic VXNlcm5hbWU6UGFzc3dvcmQ= Accept-encoding: gzip Accept: application/json ``` ```json { "error": false, "error_message": null, "data": [ { "id": 0, "description": "Bestelling", "description_en": "Order" }, { "id": 1, "description": "E-commerce", "description_en": "E-commerce" } ] } ``` -------------------------------- ### Get Specific Enum Source: https://docs.cyclesoftware.nl/ Retrieves a specific enum based on the provided subject, useful for getting detailed information about a particular enum type. ```APIDOC ## GET /api/v1/common/enum/:subject.json ### Description Fetches a specific enum based on the provided subject. Refer to the 'Enums' endpoint for a list of available subjects. ### Method GET ### Endpoint /api/v1/common/enum/:subject.json ### Parameters #### Path Parameters - **subject** (string) - Required - The subject of the enum to retrieve (e.g., `sales-order-types`). ### Response #### Success Response (200) - **error** (boolean) - Indicates if an error occurred. - **error_message** (null) - Contains error message if an error occurred. - **data** (array) - An array of objects representing the enum values for the specified subject. - **id** (integer) - The identifier for the enum value. - **description** (string) - The description of the enum value. - **description_en** (string) - The English description of the enum value. #### Response Example ```json { "error": false, "error_message": null, "data": [ { "id": 0, "description": "Bestelling", "description_en": "Order" }, { "id": 1, "description": "E-commerce", "description_en": "E-commerce" } ] } ``` ``` -------------------------------- ### Create or Update Customer with PHP SOAP Client Source: https://docs.cyclesoftware.nl/ Use this method to create a new customer or update an existing one. Customers are matched by ID, phone, mobile, reference, or email. Ensure you have the correct WSDL URL and authentication details. ```php 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', 'customer_vat_number' => 'NL855630693B01', 'DeliveryAddress' => NULL, ) ); $result = $client->CreateOrUpdateCustomer($input); var_dump($result); } catch ( SoapFault $e) { var_dump($e->getMessage()); } ``` -------------------------------- ### PHP Example for SaveOrder API Source: https://docs.cyclesoftware.nl/ This PHP code demonstrates how to construct the input object for the SaveOrder API call, including order details, customer information, and payment methods. It also shows how to handle optional third-party finance provider data and process the API response or catch SOAP faults. ```php [ 'username' => 'your-username', 'password' => 'your-password', 'dealer_id' => '1', ], 'Order' => [ 'order_reference_id' => '319813049', 'order_reference_text' => '5640c085abba9', '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' => [ 'customer_cs_customer_id' => '0', 'customer_reference' => 'unique-reference-customer', 'customer_name_prefix' => 'J', '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', ], 'OrderItems' => [ 'OrderItem' => [ [ '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, ], ], ], 'Payments' => [ 'Payment' => [ [ 'payment_method_id' => '2', 'payment_amount' => '-1021.00', 'voucher_or_discount_code' => null, 'payment_for_customer_id' => '4', ], [ 'payment_method_id' => '5', 'payment_amount' => '1521.00', 'voucher_or_discount_code' => '1000-2000-3000-4000', 'payment_for_customer_id' => '2', ], [ 'payment_method_id' => '3', 'payment_amount' => '3063.00', 'voucher_or_discount_code' => null, 'payment_for_customer_id' => null, ], ], ], ], ]; $insurance = false; // Set to true if insurance data needs to be included if ($insurance) { // Optional in case of insurance $input->ThirdPartyFinanceProvider = (object)[ 'third_party_payout_type' => 'damage', // damage, insurance or delete 'third_party_customer_id' => '200002', // the customer ID of the Insurance company. 'third_party_payout_amount' => '1000.00', // nett payment by insurance 'third_party_own_risk_amount' => '250.00', 'third_party_reference' => 'Reference1', ]; } // Assuming $client is an initialized SoapClient object for the SaveOrder WSDL // $client = new SoapClient('your_wsdl_url'); // $result = $client->SaveOrder($input); // Placeholder for actual API call and result processing $result = (object)[ 'order_id' => '12345', 'customer_id' => '67890' ]; $order_id = $result->order_id; $customer_id = $result->customer_id; var_dump($result); } catch ( SoapFault $e) { var_dump($e->getMessage()); } ?> ``` -------------------------------- ### Get Stock List Source: https://docs.cyclesoftware.nl/ Retrieves a list of stocked objects. Use this endpoint to get items that are available or pro-forma sold. Requires the 'stock-export' scope. ```json { "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, "is_rental": false, "is_new": true }, { "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, "is_rental": true, "is_new": false } ] } ``` -------------------------------- ### HTTP Response for Properties Source: https://docs.cyclesoftware.nl/ This is an example of a successful HTTP response when requesting properties. It includes details for various properties like 'article_main_group', 'handle_operation', and 'model_year'. ```json { "error": false, "error_message": null, "data": { "article_main_group": { "property_id": 310, "property_name": "article_main_group", "data_type": "codelist:article_main_group", "unit": null, "description": { "nl": "Hoofdgroep", "en": "Main group", "fr": "Groupe principal" }, "example_value": "1", "code_list": "https://s01.cyclesoftware.nl/api/v4/articledata/codelist/article_main_group.json" }, "handle_operation": { "property_id": 114, "property_name": "handle_operation", "data_type": "boolean", "unit": null, "description": { "nl": "Handvatbediening", "en": "Handle operation", "fr": "Fonctionnement de la poignée" }, "example_value": true }, "model_year": { "property_id": 120, "property_name": "model_year", "data_type": "integer", "unit": null, "description": { "nl": "Modeljaar", "en": "Model year", "fr": "Année modèle" }, "example_value": 2024 }, "highres_image_url": { "property_id": 133, "property_name": "highres_image_url", "data_type": "string[]", "unit": null, "description": { "nl": "High resolution afbeelding URL", "en": "Highres image URL", "fr": "URL de l'image haute résolution" }, "example_value": [ "http://meridaxtraazz.nl/bikeimages/merida/2013/2048/3140.jpg" ] }, "weight_bruto": { "property_id": 36, "property_name": "weight_bruto", "data_type": "decimal", "unit": "kg", "description": { "nl": "Bruto gewicht", "en": "Gross weight", "fr": "Poids brut" }, "example_value": 10 }, "pos_description": { "property_id": 142, "property_name": "pos_description", "data_type": "string", "unit": null, "description": { "nl": "Kassabontekst", "en": "Receipt text", "fr": "Texte du reçu" }, "example_value": { "user": "Kassabontekst stored in account", "nl": "Omschrijving - Kassabontekst", "en": "Description - Receipt text", "fr": "Description - Texte du reçu" } } } } ``` -------------------------------- ### HTTP Response for Stores Source: https://docs.cyclesoftware.nl/platform.html Example of a successful HTTP response containing an array of store objects. Each store object includes details like store ID, name, address, and contact information. ```json HTTP/1.1 200 Content-type: application/json; charset=utf-8 Content-length: 998 { "error_message": null, "error": false, "stores": [ { "store_id": "1-1", "store_gln": "8718288145482", "store_name": "CycleSoftware", "store_address": "Raadhuisplein 1c", "store_postal_code": "5388GM", "store_phone_number": "0733030050", "store_country_code": "NL", "store_email": "email1@example.nl", "store_coordinates": [ 51.701163, 5.5619904 ] }, { "store_id": "5185-1", "store_gln": "8718288145482", "store_name": "CS-Unit test", "store_address": "Kievitsven 22", "store_postal_code": "5249JJ", "store_phone_number": "", "store_country_code": "NL", "store_email": "email5185@example.nl", "store_coordinates": [ 51.7261667, 5.3978953 ] } ] } ``` -------------------------------- ### Employee List API Response Example Source: https://docs.cyclesoftware.nl/ Example JSON response for the employee list API endpoint, showing employee details such as ID, name, roles, and authorizations. ```json { "error": false, "error_message": null, "data": [ { "employee_id": 44269, "employee_name": "John Doe", "sso_username": "john@example.nl", "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", "sso_username": null, "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" ] } ] } ```