The Sales Invoice Advance object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
reference_type string
reference_name string
remarks string
reference_row string
advance_amount number
allocated_amount number
exchange_gain_loss number
ref_exchange_rate number
difference_posting_date string
The Sales Invoice Advance object
{
  "id": "sales-invoice-advance_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "reference_type": "reference_type_example",
  "reference_name": "reference_name_example",
  "remarks": "remarks_example",
  "reference_row": "reference_row_example",
  "advance_amount": 0,
  "allocated_amount": 0,
  "exchange_gain_loss": 0,
  "ref_exchange_rate": 0,
  "difference_posting_date": "2024-01-15"
}
GET /api/accounts/sales-invoice-advance?parent_id={id}

List sales invoice advances by parent

Returns all sales invoice advances belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of sales invoice advance objects belonging to the parent.

GET /api/accounts/sales-invoice-advance?parent_id={id}
curl https://api.overplane.dev/api/accounts/sales-invoice-advance?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "sales-invoice-advance_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "reference_type": "reference_type_example",
      "reference_name": "reference_name_example",
      "remarks": "remarks_example",
      "reference_row": "reference_row_example",
      "advance_amount": 0,
      "allocated_amount": 0,
      "exchange_gain_loss": 0,
      "ref_exchange_rate": 0,
      "difference_posting_date": "2024-01-15"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/sales-invoice-advance

Create a sales invoice advance

Creates a new sales invoice advance object.

Body parameters

idx integer
parent_id string required
parent_type string required
reference_type string
reference_name string
remarks string
reference_row string
advance_amount number
allocated_amount number
exchange_gain_loss number
ref_exchange_rate number
difference_posting_date string

Returns

Returns the newly created sales invoice advance object if the call succeeded.

POST /api/accounts/sales-invoice-advance
curl https://api.overplane.dev/api/accounts/sales-invoice-advance \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"parent_type":"parent_type_example"}'
Response
{
  "id": "sales-invoice-advance_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "reference_type": "reference_type_example",
  "reference_name": "reference_name_example",
  "remarks": "remarks_example",
  "reference_row": "reference_row_example",
  "advance_amount": 0,
  "allocated_amount": 0,
  "exchange_gain_loss": 0,
  "ref_exchange_rate": 0,
  "difference_posting_date": "2024-01-15"
}
PATCH /api/accounts/sales-invoice-advance/{id}

Update a sales invoice advance

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

Body parameters

idx integer
parent_id string
parent_type string
reference_type string
reference_name string
remarks string
reference_row string
advance_amount number
allocated_amount number
exchange_gain_loss number
ref_exchange_rate number
difference_posting_date string

Returns

Returns the updated sales invoice advance object.

PATCH /api/accounts/sales-invoice-advance/{id}
curl https://api.overplane.dev/api/accounts/sales-invoice-advance/sales-invoice-advance_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "sales-invoice-advance_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "reference_type": "reference_type_example",
  "reference_name": "reference_name_example",
  "remarks": "remarks_example",
  "reference_row": "reference_row_example",
  "advance_amount": 0,
  "allocated_amount": 0,
  "exchange_gain_loss": 0,
  "ref_exchange_rate": 0,
  "difference_posting_date": "2024-01-15"
}
DELETE /api/accounts/sales-invoice-advance/{id}

Delete a sales invoice advance

Permanently deletes a sales invoice advance. This cannot be undone.

Path parameters

id string required

The identifier of the sales invoice advance to delete.

Returns

Returns a confirmation that the sales invoice advance has been deleted.

DELETE /api/accounts/sales-invoice-advance/{id}
curl https://api.overplane.dev/api/accounts/sales-invoice-advance/sales-invoice-advance_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "sales-invoice-advance_abc123",
  "deleted": true
}
POST /api/accounts/sales-invoice-advance/reorder

Reorder sales invoice advances

Updates the sort order of sales invoice advances within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/accounts/sales-invoice-advance/reorder
curl https://api.overplane.dev/api/accounts/sales-invoice-advance/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "sales-invoice-advance_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "reference_type": "reference_type_example",
  "reference_name": "reference_name_example",
  "remarks": "remarks_example",
  "reference_row": "reference_row_example",
  "advance_amount": 0,
  "allocated_amount": 0,
  "exchange_gain_loss": 0,
  "ref_exchange_rate": 0,
  "difference_posting_date": "2024-01-15"
}