Customers

Orders can be linked to a customer. If you create an order without an address, we will use the address details from the linked customer.

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, or personal name if consumer
contactname string optional Name of contact person in case of company
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
remarks string optional Internal remarks about this customer
default_order_remarks string optional Remarks that will be added to every new order as order remarks
language string optional 'nl' or 'en', defaults to the language of your account
auto_split boolean optional Is AutoSplit default on or off for this customer, if empty we will use the account default
idtemplate integer optional Id of the template that will be used for new orders for this customer
idfulfilment_customer integer optional Only for Picqer Fulfilment: Linked to belonging fulfilment customer
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 line. Not supported with all shipping providers.
addresses.zipcode string optional
addresses.city string optional
addresses.region string optional Region, state or province
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, "idtemplate": null, "customerid": "2", "name": "Argus Tapes & Records", "contactname": "van den Hul", "telephone": "06-44786066", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": "NL123456789.B01", "calculatevat": true, "default_order_remarks": "", "auto_split": true, "language": "nl", "addresses": [ { "idcustomer_address": 5473, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "4511 CS", "city": "Breskens", "region": null, "country": "NL", "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, "idtemplate": null, "customerid": "18", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": null, "calculatevat": true, "default_order_remarks": "", "auto_split": true, "language": "nl", "addresses": [ { "idcustomer_address": 5487, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "region": null, "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ], "tags": { "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } } ]
This endpoint uses pagination.

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, "idtemplate": null, "customerid": "18", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "vatnumber": null, "calculatevat": true, "default_order_remarks": "", "auto_split": true, "language": "nl", "addresses": [ { "idcustomeraddress": 5487, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "region": null, "country": "NL", "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", "region": null, "country": "nl", "defaultinvoice": true, "defaultdelivery": true } ] }
HTTP/1.1 201 Created { "idcustomer": 22186, "idtemplate": null, "customerid": "56", "name": "Desmonds Formal Wear", "contactname": "van Lingen", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "calculatevat": true, "default_order_remarks": "", "auto_split": true, "language": "nl", "addresses": [ { "idcustomer_address": 34396, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "region": null, "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, "idtemplate": null, "customerid": "56", "name": "Desmonds Fashion B.V.", "contactname": "Van Dorp", "telephone": "06-85756303", "emailaddress": "demo@mailinator.com", "discount": 0, "calculatevat": true, "default_order_remarks": "", "auto_split": true, "language": "nl", "addresses": [ { "idcustomer_address": 34396, "name": "Argus Tapes & Records", "contactname": null, "address": "Weijkmanlaan 68", "address2": null, "zipcode": "7077 AP", "city": "Netterden", "region": null, "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ], "customerfields": [ { "idcustomerfield":551, "value":"Mostly uses L and XL sizes" } ] }

Delete customer

Customers cannot be deleted if there are orders or returns linked to them.

DELETE https://example.picqer.com/api/v1/customers/{idcustomer}
HTTP/1.1 204 No Content

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", "region": null, "country": "NL", "defaultinvoice": true, "defaultdelivery": true } ]
This endpoint uses pagination.

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", "region": null, "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", "region": null, "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", "region": null, "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

Get customer tags

GET https://example.picqer.com/api/v1/customers/{idcustomer}/tags
HTTP/1.1 200 OK [ { "idtag": 79160, "title": "PostNL", "color": "#59ae2c", "inherit": false, "textColor": "#000000" }, { "idtag": 99795, "title": "B2B", "color": "#0000f0", "inherit": true, "textColor": "#FFFFFF" } ]

Add tag to customer

POST https://example.picqer.com/api/v1/customers/{idcustomer}/tags
{ "idtag": 81737 }
HTTP/1.1 201 Created { "idtag": 81737, "title": "B2C", "color": "#0000f0", "inherit": false, "textColor": "#FFFFFF" }

Delete tag from customer

DELETE https://example.picqer.com/api/v1/customers/{idcustomer}/tags/{idtag}
HTTP/1.1 204 No Content

Comments

Comments are supported on customers.

Read more Products