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
| Parameter | In | Type | Required |
|---|---|---|---|
q | query | string | No |
status | query | string | No |
gst | query | string | No |
page | query | integer | No |
pageSize | query | integer | No |
sortBy | query | string | No |
sortDir | query | string | No |
startDate | query | string (date) | No |
endDate | query | string (date) | No |
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 field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | required, not blank |
phone | string | ||
email | string | ||
gstin | string | format: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$ | |
defaultSupplyType | string | ||
billingAddress | string | ||
shippingAddress | string | ||
state | string | ||
pin | string | ||
status | string | ||
priceListId | string | ||
creditLimit | number | ||
customerGroupId | string | ||
pan | string | format: ^$|^[A-Za-z]{5}[0-9]{4}[A-Za-z]$ | |
tcsApplicable | boolean | ||
tcsSectionId | string (uuid) |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | required, not blank |
phone | string | ||
email | string | ||
gstin | string | format: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$ | |
defaultSupplyType | string | ||
billingAddress | string | ||
shippingAddress | string | ||
state | string | ||
pin | string | ||
status | string | ||
priceListId | string | ||
creditLimit | number | ||
customerGroupId | string | ||
pan | string | format: ^$|^[A-Za-z]{5}[0-9]{4}[A-Za-z]$ | |
tcsApplicable | boolean | ||
tcsSectionId | string (uuid) |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
label | string | max length 60 | |
attention | string | max length 160 | |
phone | string | ||
line1 | string | Yes | required, not blank, max length 255 |
line2 | string | max length 255 | |
city | string | max length 80 | |
state | string | max length 80 | |
pin | string | max length 20 | |
country | string | max length 60 | |
defaultShipping | boolean |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
addressId | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
label | string | max length 60 | |
attention | string | max length 160 | |
phone | string | ||
line1 | string | Yes | required, not blank, max length 255 |
line2 | string | max length 255 | |
city | string | max length 80 | |
state | string | max length 80 | |
pin | string | max length 20 | |
country | string | max length 60 | |
defaultShipping | boolean |
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
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
addressId | path | string (uuid) | Yes |
curl -X DELETE "https://api.scalar360.com/api/v1/customers/{id}/addresses/{addressId}" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"