The Payment Terms Template object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: false
{
"id": "payment-terms-template_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"template_name": "template_name_example",
"allocate_payment_based_on_payment_terms": false
} /api/accounts/payment-terms-template/{id} Retrieve a payment terms template
Retrieves the details of an existing payment terms template. Supply the unique payment terms template ID that was returned from a previous request.
Path parameters
The identifier of the payment terms template to retrieve.
Returns
Returns the payment terms template object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/payment-terms-template/payment-terms-template_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "payment-terms-template_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"template_name": "template_name_example",
"allocate_payment_based_on_payment_terms": false
} /api/accounts/payment-terms-template List all payment terms templates
Returns a list of payment terms templates. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of payment terms template objects.
curl https://api.overplane.dev/api/accounts/payment-terms-template \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "payment-terms-template_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"template_name": "template_name_example",
"allocate_payment_based_on_payment_terms": false
}
],
"has_more": false,
"total": 1
} /api/accounts/payment-terms-template Create a payment terms template
Creates a new payment terms template object.
Body parameters
Default: false
Returns
Returns the newly created payment terms template object if the call succeeded.
curl https://api.overplane.dev/api/accounts/payment-terms-template \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" {
"id": "payment-terms-template_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"template_name": "template_name_example",
"allocate_payment_based_on_payment_terms": false
} /api/accounts/payment-terms-template/{id} Update a payment terms template
Updates the specified payment terms template by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the payment terms template to update.
Body parameters
Default: false
Returns
Returns the updated payment terms template object.
curl https://api.overplane.dev/api/accounts/payment-terms-template/payment-terms-template_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"template_name":"template_name_example","allocate_payment_based_on_payment_terms":false}' {
"id": "payment-terms-template_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"template_name": "template_name_example",
"allocate_payment_based_on_payment_terms": false
} /api/accounts/payment-terms-template/{id} Delete a payment terms template
Permanently deletes a payment terms template. This cannot be undone.
Path parameters
The identifier of the payment terms template to delete.
Returns
Returns a confirmation that the payment terms template has been deleted.
curl https://api.overplane.dev/api/accounts/payment-terms-template/payment-terms-template_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "payment-terms-template_abc123",
"deleted": true
} Line items
Child objects that belong to this payment terms template. These are accessed via the parent's ID.
Payment Terms Template Detail
Attributes
Endpoints
/api/accounts/payment-terms-template-detail?parent_id={id} /api/accounts/payment-terms-template-detail /api/accounts/payment-terms-template-detail/{id} /api/accounts/payment-terms-template-detail/{id} /api/accounts/payment-terms-template-detail/reorder {
"id": "payment-terms-template-detail_abc123",
"idx": 1,
"payment_terms_template_id": "payment_terms_template_id_example",
"payment_term": "payment_term_example",
"description": "description_example",
"invoice_portion": 0,
"due_date_based_on": "2024-01-15",
"credit_days": 0,
"credit_months": 0,
"mode_of_payment": "mode_of_payment_example",
"discount_type": "Percentage",
"discount": 0,
"discount_validity_based_on": "Day(s) after invoice date",
"discount_validity": 0
}