Pagebreak positions API

Introduction

Pagebreak positions can be used on the following resources: estimates, orders and invoices. The resource URL is built like this:

/%parent_resource%/%parent_id%/kb_position_pagebreak

If you have an invoice with ID 4 you should replace the placeholder %parent_resource% with kb_invoice and replace the placeholder %parent_id% with 4. Estimates will be used in the upcomming examples.

List pagebreak positions

GET /kb_offer/1/kb_position_pagebreak
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • id

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 184
Content-Type: application/json
[
  {
    "id": 1,
    "type": "KbPositionPagebreak",
    "internal_pos": 5,
    "parent_id": null,
    "is_optional": false
  },
  {
    "id": 8,
    "type": "KbPositionPagebreak",
    "internal_pos": 1,
    "parent_id": null,
    "is_optional": true
  }
]

Show pagebreak position

GET /kb_offer/1/kb_position_pagebreak/8
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 90
Content-Type: application/json
{
  "id": 8,
  "type": "KbPositionPagebreak",
  "internal_pos": 1,
  "parent_id": null,
  "is_optional": true
}

Create pagebreak position

POST /kb_offer/1/kb_position_pagebreak
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "is_optional": true
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
pagebreak optional string

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 201 Created
X-Authenticated-User: apiextract_1
Content-Length: 90
Content-Type: application/json
{
  "id": 8,
  "type": "KbPositionPagebreak",
  "internal_pos": 1,
  "parent_id": null,
  "is_optional": true
}

Overwrite pagebreak position

PUT /kb_offer/1/kb_position_pagebreak/8
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "is_optional": true
}
Name Required Type Description
callback optional string
Name Required Type Description
pagebreak optional string

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 90
Content-Type: application/json
{
  "id": 8,
  "type": "KbPositionPagebreak",
  "internal_pos": 1,
  "parent_id": null,
  "is_optional": true
}

Edit pagebreak position

POST /kb_offer/1/kb_position_pagebreak/8
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "is_optional": false
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
pagebreak optional string

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 94
Content-Type: application/json
{
  "id": 8,
  "type": "KbPositionPagebreak",
  "internal_pos": 9999,
  "parent_id": null,
  "is_optional": false
}

Delete pagebreak position

DELETE /kb_offer/1/kb_position_pagebreak/8
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • kb_invoice_edit
  • kb_offer_edit
  • kb_order_edit
  • kb_bill_edit
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 16
Content-Type: application/json
{
  "success": true
}