The Invoice Discounting 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.

status string

Default: draft

posting_date string required
loan_start_date string
loan_period integer
loan_end_date string
company string required
total_amount number
bank_charges number
short_term_loan string required
bank_account string required
bank_charges_account string required
accounts_receivable_credit string required
accounts_receivable_discounted string required
accounts_receivable_unpaid string required
The Invoice Discounting object
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}
GET /api/accounts/invoice-discounting/{id}

Retrieve a invoice discounting

Retrieves the details of an existing invoice discounting. Supply the unique invoice discounting ID that was returned from a previous request.

Path parameters

id string required

The identifier of the invoice discounting to retrieve.

Returns

Returns the invoice discounting object if a valid identifier was provided.

GET /api/accounts/invoice-discounting/{id}
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}
GET /api/accounts/invoice-discounting

List all invoice discountings

Returns a list of invoice discountings. 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 invoice discounting objects.

GET /api/accounts/invoice-discounting
curl https://api.overplane.dev/api/accounts/invoice-discounting \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "invoice-discounting_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "status": "draft",
      "posting_date": "2024-01-15",
      "loan_start_date": "2024-01-15",
      "loan_period": 0,
      "loan_end_date": "2024-01-15",
      "company": "Example Corp",
      "total_amount": 0,
      "bank_charges": 0,
      "short_term_loan": "short_term_loan_example",
      "bank_account": "bank_account_example",
      "bank_charges_account": "bank_charges_account_example",
      "accounts_receivable_credit": "accounts_receivable_credit_example",
      "accounts_receivable_discounted": "accounts_receivable_discounted_example",
      "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/invoice-discounting

Create a invoice discounting

Creates a new invoice discounting object.

Body parameters

status string

Default: draft

posting_date string required
loan_start_date string
loan_period integer
loan_end_date string
company string required
total_amount number
bank_charges number
short_term_loan string required
bank_account string required
bank_charges_account string required
accounts_receivable_credit string required
accounts_receivable_discounted string required
accounts_receivable_unpaid string required

Returns

Returns the newly created invoice discounting object if the call succeeded.

POST /api/accounts/invoice-discounting
curl https://api.overplane.dev/api/accounts/invoice-discounting \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"posting_date":"2024-01-15","company":"Example Corp","short_term_loan":"short_term_loan_example","bank_account":"bank_account_example","bank_charges_account":"bank_charges_account_example","accounts_receivable_credit":"accounts_receivable_credit_example","accounts_receivable_discounted":"accounts_receivable_discounted_example","accounts_receivable_unpaid":"accounts_receivable_unpaid_example"}'
Response
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}
PATCH /api/accounts/invoice-discounting/{id}

Update a invoice discounting

Updates the specified invoice discounting 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 invoice discounting to update.

Body parameters

status string

Default: draft

posting_date string
loan_start_date string
loan_period integer
loan_end_date string
company string
total_amount number
bank_charges number
short_term_loan string
bank_account string
bank_charges_account string
accounts_receivable_credit string
accounts_receivable_discounted string
accounts_receivable_unpaid string

Returns

Returns the updated invoice discounting object.

PATCH /api/accounts/invoice-discounting/{id}
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","posting_date":"2024-01-15"}'
Response
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}
DELETE /api/accounts/invoice-discounting/{id}

Delete a invoice discounting

Permanently deletes a invoice discounting. This cannot be undone.

Path parameters

id string required

The identifier of the invoice discounting to delete.

Returns

Returns a confirmation that the invoice discounting has been deleted.

DELETE /api/accounts/invoice-discounting/{id}
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "invoice-discounting_abc123",
  "deleted": true
}
POST /api/accounts/invoice-discounting/{id}/submit

Submit a invoice discounting

Submits a draft invoice discounting, transitioning its status from draft to submitted.

Path parameters

id string required

The identifier of the invoice discounting to act on.

Returns

Returns the invoice discounting object with updated status.

POST /api/accounts/invoice-discounting/{id}/submit
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123/submit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}
POST /api/accounts/invoice-discounting/{id}/cancel

Cancel a invoice discounting

Cancels a submitted invoice discounting, transitioning its status to cancelled.

Path parameters

id string required

The identifier of the invoice discounting to act on.

Returns

Returns the invoice discounting object with updated status.

POST /api/accounts/invoice-discounting/{id}/cancel
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123/cancel \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "invoice-discounting_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "posting_date": "2024-01-15",
  "loan_start_date": "2024-01-15",
  "loan_period": 0,
  "loan_end_date": "2024-01-15",
  "company": "Example Corp",
  "total_amount": 0,
  "bank_charges": 0,
  "short_term_loan": "short_term_loan_example",
  "bank_account": "bank_account_example",
  "bank_charges_account": "bank_charges_account_example",
  "accounts_receivable_credit": "accounts_receivable_credit_example",
  "accounts_receivable_discounted": "accounts_receivable_discounted_example",
  "accounts_receivable_unpaid": "accounts_receivable_unpaid_example"
}

Line items

Child objects that belong to this invoice discounting. These are accessed via the parent's ID.

Discounted Invoice

Attributes

idx integer
invoice_discounting_id string required
sales_invoice string required
customer string
posting_date string
outstanding_amount number
debit_to string

Endpoints

GET /api/accounts/discounted-invoice?parent_id={id}
POST /api/accounts/discounted-invoice
PATCH /api/accounts/discounted-invoice/{id}
DELETE /api/accounts/discounted-invoice/{id}
POST /api/accounts/discounted-invoice/reorder
Discounted Invoice object
{
  "id": "discounted-invoice_abc123",
  "idx": 1,
  "invoice_discounting_id": "invoice_discounting_id_example",
  "sales_invoice": "sales_invoice_example",
  "customer": "customer_example",
  "posting_date": "2024-01-15",
  "outstanding_amount": 0,
  "debit_to": "debit_to_example"
}