Version : 0.0.1 [v.1]
Base URL : https://public-api.crunch.co.uk/v1/clients
POST /
Type | Name | Schema |
---|---|---|
Body | body optional |
CustomerDto |
HTTP Code | Description | Schema |
---|---|---|
200 | New customer was created | CustomerDto |
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | create:all |
/
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
GET /clients
The default sorting criterion is companyName,asc
.
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query | page optional |
The index of the page to retrieve, based at 0. | integer (int32) | |
Query | size optional |
Number of records returned per page. Maximum value allowed is 200. | integer (int32) | 20 |
Query | sort optional |
Sorting criteria by a given field . |
< string (<field>[,asc|desc]) > array(multi) |
HTTP Code | Description | Schema |
---|---|---|
200 | Clients are successfully returned | PageCustomerDto |
application/json
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | read:all |
/clients
{
"content" : [ {
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
} ],
"empty" : true,
"first" : true,
"last" : true,
"number" : 0,
"numberOfElements" : 0,
"pageable" : {
"offset" : 0,
"pageNumber" : 0,
"pageSize" : 0,
"paged" : true,
"sort" : {
"empty" : true,
"sorted" : true,
"unsorted" : true
},
"unpaged" : true
},
"size" : 0,
"sort" : {
"empty" : true,
"sorted" : true,
"unsorted" : true
},
"totalElements" : 0,
"totalPages" : 0
}
/list
instead.GET /clients/list
HTTP Code | Description | Schema |
---|---|---|
200 | Customers are successfully returned | < CustomerDto > array |
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | read:all |
/clients/list
[ {
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
} ]
GET /list
HTTP Code | Description | Schema |
---|---|---|
200 | Customers are successfully returned | < CustomerDto > array |
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | read:all |
/list
[ {
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
} ]
DELETE /{customerId}
Type | Name | Schema |
---|---|---|
Path | customerId required |
integer (int64) |
HTTP Code | Description | Schema |
---|---|---|
200 | Customer successfully deleted | CustomerDto |
400 | Bad request or customer is not deletable | No Content |
404 | Customer could not be found for client | No Content |
500 | Internal issue occurred whilst deleting customer | No Content |
application/json
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | delete:all |
/0
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
GET /{id}
Type | Name | Schema |
---|---|---|
Path | id required |
integer (int64) |
HTTP Code | Description | Schema |
---|---|---|
200 | Customer details found and successfully returned | CustomerDto |
404 | Customer details not found | No Content |
500 | An issue getting the Customer details occurred | No Content |
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | read:all |
/0
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
PUT /{id}
Type | Name | Schema |
---|---|---|
Path | id required |
integer (int64) |
Body | body optional |
CustomerDto |
HTTP Code | Description | Schema |
---|---|---|
200 | Customer details successfully updated | CustomerDto |
404 | Customer details not found | No Content |
500 | An issue updating the Customer details occurred | No Content |
application/json
Type | Name | Scopes |
---|---|---|
Unknown | oauth2-authorisation-code | update:all |
/0
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
{
"billingAddress" : {
"country" : "string",
"line1" : "string",
"line2" : "string",
"line3" : "string",
"line4" : "string",
"postCode" : "string"
},
"email" : "string",
"id" : 0,
"name" : "string",
"note" : {
"id" : 0,
"text" : "string"
},
"paymentTermsDays" : 0
}
Name | Description | Schema |
---|---|---|
country optional |
Length : 0 - 50 Example : "string" |
string |
line1 optional |
Length : 0 - 150 Example : "string" |
string |
line2 optional |
Length : 0 - 150 Example : "string" |
string |
line3 optional |
Length : 0 - 150 Example : "string" |
string |
line4 optional |
Length : 0 - 150 Example : "string" |
string |
postCode optional |
Length : 0 - 8 Example : "string" |
string |
Name | Description | Schema |
---|---|---|
billingAddress optional |
Example : "[addressdto](#addressdto)" |
AddressDto |
email optional |
Example : "string" |
string |
id optional |
Example : 0 |
integer (int64) |
name optional |
Example : "string" |
string |
note optional |
Example : "[notedto](#notedto)" |
NoteDto |
paymentTermsDays optional |
Example : 0 |
integer (int32) |
Name | Description | Schema |
---|---|---|
id optional |
Example : 0 |
integer (int64) |
text optional |
Example : "string" |
string |
Name | Description | Schema |
---|---|---|
content optional |
Example : [ "[customerdto](#customerdto)" ] |
< CustomerDto > array |
empty optional |
Example : true |
boolean |
first optional |
Example : true |
boolean |
last optional |
Example : true |
boolean |
number optional |
Example : 0 |
integer (int32) |
numberOfElements optional |
Example : 0 |
integer (int32) |
pageable optional |
Example : "[pageable](#pageable)" |
Pageable |
size optional |
Example : 0 |
integer (int32) |
sort optional |
Example : "[sort](#sort)" |
Sort |
totalElements optional |
Example : 0 |
integer (int64) |
totalPages optional |
Example : 0 |
integer (int32) |
Name | Description | Schema |
---|---|---|
offset optional |
Example : 0 |
integer (int64) |
pageNumber optional |
Example : 0 |
integer (int32) |
pageSize optional |
Example : 0 |
integer (int32) |
paged optional |
Example : true |
boolean |
sort optional |
Example : "[sort](#sort)" |
Sort |
unpaged optional |
Example : true |
boolean |
Name | Description | Schema |
---|---|---|
empty optional |
Example : true |
boolean |
sorted optional |
Example : true |
boolean |
unsorted optional |
Example : true |
boolean |