Developer docs menu

API reference / Customers

Customers API

9 endpoints. Scopes: Scalar360.customers.READ, .CREATE, .UPDATE, .DELETE or .ALL. All calls need Authorization: Scalar360-oauthtoken <access_token> — see Authentication.

GET

List

/api/v1/customers

Scope: Scalar360.customers.READ

ParameterInTypeRequired
qquerystringNo
statusquerystringNo
gstquerystringNo
pagequeryintegerNo
pageSizequeryintegerNo
sortByquerystringNo
sortDirquerystringNo
startDatequerystring (date)No
endDatequerystring (date)No
Example request
curl -X GET "https://api.scalar360.com/api/v1/customers" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
POST

Create

/api/v1/customers

Scope: Scalar360.customers.CREATE

Body fieldTypeRequiredNotes
namestringYesrequired, not blank
phonestring
emailstring
gstinstringformat: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$
defaultSupplyTypestring
billingAddressstring
shippingAddressstring
statestring
pinstring
statusstring
priceListIdstring
creditLimitnumber
customerGroupIdstring
panstringformat: ^$|^[A-Za-z]{5}[0-9]{4}[A-Za-z]$
tcsApplicableboolean
tcsSectionIdstring (uuid)
Example request
curl -X POST "https://api.scalar360.com/api/v1/customers" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'
GET

Get

/api/v1/customers/{id}

Scope: Scalar360.customers.READ

ParameterInTypeRequired
idpathstring (uuid)Yes
Example request
curl -X GET "https://api.scalar360.com/api/v1/customers/{id}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
PUT

Update

/api/v1/customers/{id}

Scope: Scalar360.customers.UPDATE

ParameterInTypeRequired
idpathstring (uuid)Yes
Body fieldTypeRequiredNotes
namestringYesrequired, not blank
phonestring
emailstring
gstinstringformat: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$
defaultSupplyTypestring
billingAddressstring
shippingAddressstring
statestring
pinstring
statusstring
priceListIdstring
creditLimitnumber
customerGroupIdstring
panstringformat: ^$|^[A-Za-z]{5}[0-9]{4}[A-Za-z]$
tcsApplicableboolean
tcsSectionIdstring (uuid)
Example request
curl -X PUT "https://api.scalar360.com/api/v1/customers/{id}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","phone":"string","email":"string","gstin":"string","defaultSupplyType":"string","billingAddress":"string"}'
DELETE

Delete

/api/v1/customers/{id}

Scope: Scalar360.customers.DELETE

ParameterInTypeRequired
idpathstring (uuid)Yes
Example request
curl -X DELETE "https://api.scalar360.com/api/v1/customers/{id}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
GET

List

/api/v1/customers/{id}/addresses

Scope: Scalar360.customers.READ

ParameterInTypeRequired
idpathstring (uuid)Yes
Example request
curl -X GET "https://api.scalar360.com/api/v1/customers/{id}/addresses" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
POST

Create

/api/v1/customers/{id}/addresses

Scope: Scalar360.customers.CREATE

ParameterInTypeRequired
idpathstring (uuid)Yes
Body fieldTypeRequiredNotes
labelstringmax length 60
attentionstringmax length 160
phonestring
line1stringYesrequired, not blank, max length 255
line2stringmax length 255
citystringmax length 80
statestringmax length 80
pinstringmax length 20
countrystringmax length 60
defaultShippingboolean
Example request
curl -X POST "https://api.scalar360.com/api/v1/customers/{id}/addresses" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"line1":"string"}'
PUT

Update

/api/v1/customers/{id}/addresses/{addressId}

Scope: Scalar360.customers.UPDATE

ParameterInTypeRequired
idpathstring (uuid)Yes
addressIdpathstring (uuid)Yes
Body fieldTypeRequiredNotes
labelstringmax length 60
attentionstringmax length 160
phonestring
line1stringYesrequired, not blank, max length 255
line2stringmax length 255
citystringmax length 80
statestringmax length 80
pinstringmax length 20
countrystringmax length 60
defaultShippingboolean
Example request
curl -X PUT "https://api.scalar360.com/api/v1/customers/{id}/addresses/{addressId}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"label":"string","attention":"string","phone":"string","line1":"string","line2":"string","city":"string"}'
DELETE

Delete

/api/v1/customers/{id}/addresses/{addressId}

Scope: Scalar360.customers.DELETE

ParameterInTypeRequired
idpathstring (uuid)Yes
addressIdpathstring (uuid)Yes
Example request
curl -X DELETE "https://api.scalar360.com/api/v1/customers/{id}/addresses/{addressId}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"