Payment Term
WIP: A summary needs to be written for Payment Term
GET/v3/payment_term/:id
Find Payment Term
Find one Payment Term by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object to retrieve
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object Required
- Description
- PaymentTerm schema
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Properties for data
object
- Name
id
- Type
- string Required
- Description
- Name
meta
- Type
- object Required
- Description
- the metadata about the most recent change to the row
- Name
metadata
- Type
- object
- Description
- metadata reserved for customers to control
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
name
- Type
- string Required
- Description
- Name
dueInDays
- Type
- number Required
- Description
- Name
note
- Type
- string Required
- Description
- Name
editable
- Type
- boolean Required
- Description
- if it is not a built-in payment term (eg. On Receipt)
- Name
fleetDefault
- Type
- boolean Required
- Description
- if it is the default for new fleets
- Name
customerDefault
- Type
- boolean Required
- Description
- if it is the default for new customers
- Name
companyId
- Type
- string Required
- Description
- Name
locationId
- Type
- string Required
- Description
Properties for meta
object
- Name
userId
- Type
- string
- Description
- the user id that made the most recent change
- Name
sessionId
- Type
- string
- Description
- the session id for the most recent change
- Name
version
- Type
- number
- Description
- a monotonically increasing number for the most recent change
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
GET
/v3/payment_term/:idcurl https://api.shopmonkey.cloud/v3/payment_term/ID \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"meta": {
"userId": "userId",
"sessionId": "sessionId",
"version": 1
},
"createdDate": "createdDate",
"updatedDate": null,
"name": "name",
"dueInDays": 1,
"note": "note",
"editable": true,
"fleetDefault": true,
"customerDefault": true,
"companyId": "companyId",
"locationId": "locationId"
}
}
GET/v3/payment_term
List Payment Terms
Find all Payment Terms
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- array Required
- Description
- an array of items
- Name
meta
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Properties for meta
object
- Name
hasMore
- Type
- boolean Required
- Description
- if there are more records available
- Name
total
- Type
- number Required
- Description
- the total number of records
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
GET
/v3/payment_termcurl https://api.shopmonkey.cloud/v3/payment_term \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": [
{
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"name": "name",
"dueInDays": 1,
"note": "note",
"editable": true,
"fleetDefault": true,
"customerDefault": true,
"companyId": "companyId",
"locationId": "locationId"
}
]
}
PUT/v3/payment_term/:id
Update Payment Term
Update one Payment Term by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object to update
Body parameters
Consumes
The following content type is required: application/json
- Name
name
- Type
- string
- Description
- Name
dueInDays
- Type
- number
- Description
- Name
note
- Type
- string
- Description
- Name
editable
- Type
- boolean
- Description
- if it is not a built-in payment term (eg. On Receipt)
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
PUT
/v3/payment_term/:idcurl https://api.shopmonkey.cloud/v3/payment_term/ID \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
POST/v3/payment_term
Create Payment Term
Create an Payment Term
Body parameters
Consumes
The following content type is required: application/json
- Name
name
- Type
- string Required
- Description
- Name
dueInDays
- Type
- number Required
- Description
- Name
note
- Type
- string
- Description
- Name
editable
- Type
- boolean
- Description
- if it is not a built-in payment term (eg. On Receipt)
- Name
fleetDefault
- Type
- boolean
- Description
- if it is the default for new fleets
- Name
customerDefault
- Type
- boolean
- Description
- if it is the default for new customers
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
- PaymentTerm schema
Properties for data
object
- Name
id
- Type
- string Required
- Description
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
name
- Type
- string Required
- Description
- Name
dueInDays
- Type
- number Required
- Description
- Name
note
- Type
- string Required
- Description
- Name
editable
- Type
- boolean Required
- Description
- if it is not a built-in payment term (eg. On Receipt)
- Name
fleetDefault
- Type
- boolean Required
- Description
- if it is the default for new fleets
- Name
customerDefault
- Type
- boolean Required
- Description
- if it is the default for new customers
- Name
companyId
- Type
- string Required
- Description
- Name
locationId
- Type
- string Required
- Description
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
POST
/v3/payment_termcurl https://api.shopmonkey.cloud/v3/payment_term \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "name" : "value", "dueInDays" : 0 }'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"name": "name",
"dueInDays": 1,
"note": "note",
"editable": true,
"fleetDefault": true,
"customerDefault": true,
"companyId": "companyId",
"locationId": "locationId"
}
}
DELETE/v3/payment_term/:id
Delete Payment Term
Permanently delete a Payment Term by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the record to delete
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
DELETE
/v3/payment_term/:idcurl https://api.shopmonkey.cloud/v3/payment_term/ID \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
PUT/v3/payment_term/:id/default
Set Default
Set a default Payment Term
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the payment term
Body parameters
Consumes
The following content type is required: application/json
- Name
customerType
- Type
- one of: Customer, Fleet Required
- Description
- type of customer to set this as the default to
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- undefined
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
PUT
/v3/payment_term/:id/defaultcurl https://api.shopmonkey.cloud/v3/payment_term/ID/default \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{ "customerType" : "value" }'
Example Responseapplication/json
{
"success": true
}