API reference / Customers
Customers API
5 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 |
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 |
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 |
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"