Customers

All orders needs to be added to a customer. A customer can be the client who will receive the order, but the customer can also be a webshop you provide fulfilling-services for. You can provide a delivery address per order to support the fulfillment option.

Attributes

Name Type Required Description
idcustomer integer generated Unique Picqer reference
customerid integer optional Per-account customer number
name string required Company name of customer
contactname string required Name of contact person
telephone string optional
emailaddress string optional
discount float optional Percentage of discount this customer gets by default
vatnumber string optional VAT number
calculatevat boolean optional If this client needs to pay VAT or not, defaults to true
addresses array optional Array with one or multiple addresses
addresses.name string required
addresses.contactname string optional
addresses.address string optional
addresses.address2 string optional Second address rule. Not supported with all shipping providers.
addresses.zipcode string optional
addresses.city string optional
addresses.country string optional Country of address (needs to be ISO 3166 2-char code)
addresses.defaultinvoice boolean optional If this address must be used as invoice address on a new order. Only 1 address can be default invoice address
addresses.defaultdelivery boolean optional If this address must be used as devilvery address on a new order. Only 1 address can be default delivery address

Get all customers

GET https://example.picqer.com/api/v1/customers
HTTP/1.1 200 OK [ { "idcustomer": 5607, "customerid": "2", "name": "Argus Tapes & Records", "contactname": "van den Hul", "telephone": "06-44786066", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": "NL123456789.B01", "calculatevat": true, "defaultorderremarks": "", "auto_split": true, "addresses": [ { "idcustomer_address": 5473, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "4511 CS", "city": "Breskens", "country": "AF", "defaultinvoice": true, "defaultdelivery": true } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } }, { "idcustomer": 5621, "customerid": "18", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": null, "calculatevat": true, "defaultorderremarks": null, "auto_split": true, "addresses": [ { "idcustomer_address": 5487, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "country": "Netterden", "defaultinvoice": true, "defaultdelivery": true } ], "tags": { "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } } ]

Filters

You can filter the customers with the following parameters. Add these filters as querystring parameters to the URL.

Attribute Description Example
search Search through the fields name, contact name, emailadress and customerid.
customerid Get the customer with this customerid.

Get single customer

GET https://example.picqer.com/api/v1/customers/{idcustomer}
HTTP/1.1 200 OK { "idcustomer": 5621, "customerid": "18", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": null, "calculatevat": true, "defaultorderremarks": null, "auto_split": true, "addresses": [ { "idcustomeraddress": 5487, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "country": "Netterden", "defaultinvoice": true, "defaultdelivery": true } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } }, "customerfields": [ { "idcustomerfield":551, "title":"Sizes", "value":"Mostly uses L and XL sizes" } ] }

Create new customer

POST https://example.picqer.com/api/v1/customers
{ "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "addresses": [ { "name": "Argus Tapes & Records", "address": "Weijkmanlaan 68", "zipcode": "7077 AP", "city": "Netterden", "country": "nl", "defaultinvoice": true, "defaultdelivery": true } ] }
HTTP/1.1 201 Created { "idcustomer": 22186, "customerid": "56", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "calculatevat": true, "defaultorderremarks": null, "addresses": [ { "idcustomer_address": 34396, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ], "customerfields": [] }

Update customer

PUT https://example.picqer.com/api/v1/customers/{idcustomer}
{ "name": "Desmonds Fashion B.V.", "contactname": "Van Dorp" }
HTTP/1.1 200 OK { "idcustomer": 22186, "customerid": "56", "name": "Desmonds Fashion B.V.", "contactname": "Van Dorp", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "calculatevat": true, "defaultorderremarks": null, "addresses": [ { "idcustomer_address": 34396, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ], "customerfields": [ { "idcustomerfield":551, "value":"Mostly uses L and XL sizes" } ] }

Get customer addresses

GET https://example.picqer.com/api/v1/customers/{idcustomer}/addresses
HTTP/1.1 200 OK [ { "idcustomer_address": 38, "name": "Anouk Rutten", "contactname": null, "address": "von Heinrich d'Omóróviczasteeg 54m", "address2": null, "zipcode": "1712 UC", "city": "De Tike", "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ]

Create new customer address

POST https://example.picqer.com/api/v1/customers/{idcustomer}/addresses
{ "name": "Dirk Rutte", "address": "von Heinrich d'Omóróviczasteeg 54m", "zipcode": "1712 UC", "city": "De Tike", "country": "NL" }
HTTP/1.1 201 Created { "idcustomer_address": 41, "name": "Dirk Rutte", "contactname": null, "address": "von Heinrich d'Omóróviczasteeg 54m", "address2": null, "zipcode": "1712 UC", "city": "De Tike", "country": "NL", "defaultinvoice": false, "defaultdelivery": false }

Update customer address

PUT https://example.picqer.com/api/v1/customers/{idcustomer}/addresses/{idcustomer_address}
{ "name": "Kees de Jager", }
HTTP/1.1 200 OK { "idcustomer_address": 41, "name": "Kees de Jager", "contactname": null, "address": "von Heinrich d'Omóróviczasteeg 54m", "address2": null, "zipcode": "1712 UC", "city": "De Tike", "country": "NL", "defaultinvoice": false, "defaultdelivery": false }

Remove customer address

DELETE https://example.picqer.com/api/v1/customers/{idcustomer}/addresses/{idcustomer_address}
HTTP/1.1 204 No Content
Read more Products