The Invoice Discounting 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: draft
{
"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"
} /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
The identifier of the invoice discounting to retrieve.
Returns
Returns the invoice discounting object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123 \
-H "Authorization: Bearer sk_test_..." {
"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"
} /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
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of invoice discounting objects.
curl https://api.overplane.dev/api/accounts/invoice-discounting \
-H "Authorization: Bearer sk_test_..." {
"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
} /api/accounts/invoice-discounting Create a invoice discounting
Creates a new invoice discounting object.
Body parameters
Default: draft
Returns
Returns the newly created invoice discounting object if the call succeeded.
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"}' {
"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"
} /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
The identifier of the invoice discounting to update.
Body parameters
Default: draft
Returns
Returns the updated invoice discounting object.
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"}' {
"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"
} /api/accounts/invoice-discounting/{id} Delete a invoice discounting
Permanently deletes a invoice discounting. This cannot be undone.
Path parameters
The identifier of the invoice discounting to delete.
Returns
Returns a confirmation that the invoice discounting has been deleted.
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "invoice-discounting_abc123",
"deleted": true
} /api/accounts/invoice-discounting/{id}/submit Submit a invoice discounting
Submits a draft invoice discounting, transitioning its status from draft to submitted.
Path parameters
The identifier of the invoice discounting to act on.
Returns
Returns the invoice discounting object with updated status.
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123/submit \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"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"
} /api/accounts/invoice-discounting/{id}/cancel Cancel a invoice discounting
Cancels a submitted invoice discounting, transitioning its status to cancelled.
Path parameters
The identifier of the invoice discounting to act on.
Returns
Returns the invoice discounting object with updated status.
curl https://api.overplane.dev/api/accounts/invoice-discounting/invoice-discounting_abc123/cancel \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"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
Endpoints
/api/accounts/discounted-invoice?parent_id={id} /api/accounts/discounted-invoice /api/accounts/discounted-invoice/{id} /api/accounts/discounted-invoice/{id} /api/accounts/discounted-invoice/reorder {
"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"
}