The Payment Terms Template object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

template_name string
allocate_payment_based_on_payment_terms boolean

Default: false

The Payment Terms Template object
{
  "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
}
GET /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

id string required

The identifier of the payment terms template to retrieve.

Returns

Returns the payment terms template object if a valid identifier was provided.

GET /api/accounts/payment-terms-template/{id}
curl https://api.overplane.dev/api/accounts/payment-terms-template/payment-terms-template_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
GET /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

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of payment terms template objects.

GET /api/accounts/payment-terms-template
curl https://api.overplane.dev/api/accounts/payment-terms-template \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
POST /api/accounts/payment-terms-template

Create a payment terms template

Creates a new payment terms template object.

Body parameters

template_name string
allocate_payment_based_on_payment_terms boolean

Default: false

Returns

Returns the newly created payment terms template object if the call succeeded.

POST /api/accounts/payment-terms-template
curl https://api.overplane.dev/api/accounts/payment-terms-template \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json"
Response
{
  "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
}
PATCH /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

id string required

The identifier of the payment terms template to update.

Body parameters

template_name string
allocate_payment_based_on_payment_terms boolean

Default: false

Returns

Returns the updated payment terms template object.

PATCH /api/accounts/payment-terms-template/{id}
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}'
Response
{
  "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
}
DELETE /api/accounts/payment-terms-template/{id}

Delete a payment terms template

Permanently deletes a payment terms template. This cannot be undone.

Path parameters

id string required

The identifier of the payment terms template to delete.

Returns

Returns a confirmation that the payment terms template has been deleted.

DELETE /api/accounts/payment-terms-template/{id}
curl https://api.overplane.dev/api/accounts/payment-terms-template/payment-terms-template_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "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

idx integer
payment_terms_template_id string required
payment_term string
description string
invoice_portion number required
due_date_based_on string required
credit_days integer
credit_months integer
mode_of_payment string
discount_type string
discount number
discount_validity_based_on string
discount_validity integer

Endpoints

GET /api/accounts/payment-terms-template-detail?parent_id={id}
POST /api/accounts/payment-terms-template-detail
PATCH /api/accounts/payment-terms-template-detail/{id}
DELETE /api/accounts/payment-terms-template-detail/{id}
POST /api/accounts/payment-terms-template-detail/reorder
Payment Terms Template Detail object
{
  "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
}