Public Nook API

BASE URL
https://api.nook.io

Authentication

Sign into view and manage your API credentials

Get Purchase

Get a purchase by ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

deleted

optional, boolean, default: false

Whether deleted invoices should be retrievable

Path Parameters

purchase_id

required, integer
GET
/v1/purchases/:purchase_id
1

Update Purchase

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

purchase_id

required, integer

Request Body

Purchase Data

required, object
POST
/v1/purchases/:purchase_id
1
EXAMPLE BODY
{
  "reference": "laboris mollit reprehenderit incididunt",
  "order_date": "1913-03-07",
  "issue_date": "1938-03-22",
  "due_date": "1953-01-07",
  "invoice_number": "eiusmod ut elit",
  "order_number": "dolor labore in do amet",
  "credit_note_number": "pariat",
  "order_id": -16816205,
  "currency_id": "GBR",
  "type": "CreditNote",
  "supplier_trading_entity_id": 23383724,
  "line_items": [],
  "visible_to_supplier": true
}

List Purchases

List purchases.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

start

optional, integer, nullable, default: 0

limit

optional, integer, nullable, default: 100

name

optional, string, nullable

q

optional, string, nullable

Search on invoice, order, credit note number, reference, trading entity or supplier name or accounting system ID

status[]

optional, array, nullable

Deprecated, use type, payment and trade status

is_draft

optional, boolean, nullable

Deprecated, use type, payment and trade status

type[]

optional, array, nullable

payment_status[]

optional, array, nullable

state[]

optional, array, nullable

is_approved

optional, boolean, nullable

is_overdue

optional, boolean, nullable

supplier_id

optional, integer, nullable

due_date_start

optional, string, nullable

due_date_end

optional, string, nullable

last_updated

optional, string, nullable

sort

optional, string enum, nullable

Possible Enum Values

TotalDesc

DueDateDesc

IssueDateDesc

PaymentDateDesc

OrderDateDesc

CreditDateDesc

TotalAsc

query

optional, string, nullable
GET
/v1/purchases
1

Create Purchase

Create a purchase.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Purchase Data

required, object
POST
/v1/purchases
1
EXAMPLE BODY
{
  "due_date": "1938-11-29",
  "use_defaults": false,
  "order_id": -8845601,
  "supplier_trading_entity_id": -1259981,
  "type": "Invoice",
  "currency_id": "GBR"
}

Update Purchase Status

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

purchase_id

required, integer

Request Body

Data

required, object
POST
/v1/purchases/:purchase_id/status
1
EXAMPLE BODY
{
  "action": "accept_close_request"
}

Get Accounting Invoice

Get an invoice from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/purchases/accounting/invoice/:accounting_id
1

Create Or Update Accounting Invoice

Get an invoice from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/purchases/accounting/invoice/:accounting_id
1

Get Accounting Credit Note

Get a credit note from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/purchases/accounting/credit-note/:accounting_id
1

Create Or Update Accounting Credit Note

Get a credit note from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/purchases/accounting/credit-note/:accounting_id
1

Get Accounting Order

Get an order from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/purchases/accounting/order/:accounting_id
1

Create Or Update Accounting Order

Get an order from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/purchases/accounting/order/:accounting_id
1

Current

Get information about the company for whom you're calling the API.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

GET
/v1/companies/current
1

Discover

Discover for companies to connect to. Companies are retrieved from either Nook or a company register, such as Companies' House.

To search through companies you've connected to, use the /network list endpoint.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

q

required, string, minimum length of 3

A search query, matching either in the company name or registration number

country_id

optional, string, nullable, maximum length of 2, minimum length of 2

The country the resulting companies should be registered in as an ISO 3166 alpha-2 country code

sub_division_id

optional, string, nullable, maximum length of 6, minimum length of 5

The country subdivision the resulting companies should be registered in as an ISO 3166-1 country subdivision code

GET
/v1/companies/discover
1

Get Sale

Get a sale by ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

deleted

optional, boolean, default: false

Whether deleted sales should be retrievable

Path Parameters

sale_id

required, integer
GET
/v1/sales/:sale_id
1

Update Sale

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

sale_id

required, integer

Request Body

Sale Data

required, object
POST
/v1/sales/:sale_id
1
EXAMPLE BODY
{
  "reference": "adipisicing laborum elit Lorem labore",
  "order_date": "1942-05-09",
  "issue_date": "1920-11-18",
  "due_date": "1934-05-07",
  "invoice_number": "nulla enim exercitation Ut",
  "order_number": "in",
  "credit_note_number": "deserunt qui minim",
  "order_id": -14641628,
  "currency_id": "GBR",
  "inclusive_tax": false,
  "type": "PrePayment",
  "customer_trading_entity_id": 71597221,
  "line_items": []
}

List Sales

List all sales.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

name

optional, string, nullable

q

optional, string, nullable

Search on invoice, order, credit note number, reference, trading entity or customer name or accounting system ID

start

optional, integer, default: 0

limit

optional, integer, default: 100

status[]

optional, array, nullable

Deprecated, use type, payment and trade status

is_draft

optional, boolean, nullable

Deprecated, use type, payment and trade status

type[]

optional, array, nullable

payment_status[]

optional, array, nullable

state[]

optional, array, nullable

is_approved

optional, boolean, nullable

is_overdue

optional, boolean, nullable

customer_id

optional, integer, nullable

due_date_start

optional, string, nullable

due_date_end

optional, string, nullable

last_updated

optional, string, nullable

sort

optional, string enum, nullable

Possible Enum Values

TotalDesc

DueDateDesc

IssueDateDesc

PaymentDateDesc

OrderDateDesc

CreditDateDesc

TotalAsc

query

optional, string, nullable
GET
/v1/sales
1

Create Sale

Create a sale.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Sale Data

required, object
POST
/v1/sales
1
EXAMPLE BODY
{
  "order_number": "et exercitation quis elit",
  "order_id": -70354264,
  "auto_submit": false,
  "customer_trading_entity_id": -12929236,
  "currency_id": "GBR"
}

Update Purchase Status

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

sale_id

required, integer

Request Body

Data

required, object
POST
/v1/sales/:sale_id/status
1
EXAMPLE BODY
{
  "action": "edit"
}

Get Accounting Invoice

Get an invoice from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/sales/accounting/invoice/:accounting_id
1

Create Or Update Accounting Invoice

Get an invoice from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/sales/accounting/invoice/:accounting_id
1

Get Accounting Credit Note

Get a credit note from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/sales/accounting/credit-note/:accounting_id
1

Create Or Update Accounting Credit Note

Get a credit note from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/sales/accounting/credit-note/:accounting_id
1

Get Accounting Order

Get an order from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/sales/accounting/order/:accounting_id
1

Create Or Update Accounting Order

Get an order from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/sales/accounting/order/:accounting_id
1

Get Network

Get the network edge for a connected company by its company ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

child_id

required, integer
GET
/v1/network/:child_id
1

List Networks

List all companies in your network.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

start

optional, integer, default: 0

limit

optional, integer, default: 100

q

optional, string, nullable

A search query, matching either in the company name or registration number

query

optional, string, nullable

sort

optional, array, nullable
GET
/v1/network
1

Connect

Connect to a company by either their company ID or registration number. /network/connect is the preferred way to connect to companies, as it allows the automatic set-up of company detail, which makes payments to these organisations more likely to succeed. The /network/discover endpoint can help you find the correct company.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Connect Company Request
required
POST
/v1/network/connect
1
EXAMPLE BODY
{
  "company_id": 45195836
}

Create New Organisation

Create a new company in the network. /network/connect is the preferred way to connect to companies. /network/new should only be used if the company cannot be found through /companies/discover or when the entity added to the network is an individual. Adding a new company that has not been identified in a registry may cause delays or other issues when paying the added company.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

New Organisation Request
required
POST
/v1/network/new
1
EXAMPLE BODY
{
  "use_defaults": false,
  "org_type": "Company",
  "name": "Payaable Ltd.",
  "country_id": "GB"
}

Get Accounting Contact

Get a contact from the accounting system and return it to the user.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
GET
/v1/network/accounting/contact/:accounting_id
1

Create Or Update Accounting Contact

Get a contact from the accounting system and create it in the database if it does not exist or update it if it does.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

accounting_id

required, string
POST
/v1/network/accounting/contact/:accounting_id
1

Get Trading Entity

Get a trading entity its ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

include_archived

optional, boolean, default: true

Path Parameters

trading_entity_id

required, integer
GET
/v1/trading-entities/:trading_entity_id
1

Update Trading Entity

Update the trading entity with the given ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

trading_entity_id

required, integer

Request Body

Data

required, object
PATCH
/v1/trading-entities/:trading_entity_id
1
EXAMPLE BODY
{
  "child_bank_account": {
    "account_number": "sit Lorem culpa",
    "routing_code": "sint ut laboris sed reprehenderit",
    "routing_code_type": "ifsc",
    "int_bic": "velit",
    "int_iban": "amet veniam magna",
    "currency_id": "GBR",
    "bacs_account_number": "do sunta",
    "bacs_sort_code": "adipis",
    "override_cop_check": true,
    "holder_name": "John Doe"
  },
  "name": "Nook",
  "is_default": true,
  "default_sale_tax_rate_id": "cupi",
  "default_sale_account_id": "consequat dolor dolore",
  "default_purchase_tax_rate_id": "Duis veniam ut",
  "default_purchase_account_id": "aute dolore u",
  "metadata": [
    {
      "nullable": true
    },
    {
      "nullable": true
    },
    {
      "nullable": true
    },
    {
      "nullable": true
    }
  ]
}

Archive Trading Entity

Archive the trading entity.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

trading_entity_id

required, integer
DELETE
/v1/trading-entities/:trading_entity_id
1

List Trading Entities

List all trading entities in your network.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Query Parameters

start

optional, integer, default: 0

limit

optional, integer, default: 100

include_archived

optional, boolean, default: false

query

optional, string, nullable

sort

optional, array, nullable
GET
/v1/trading-entities
1

Create Trading Entity

create a trading entity.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Data

required, object
POST
/v1/trading-entities
1
EXAMPLE BODY
{
  "child_id": 79448942,
  "name": "Nook",
  "default_email": "Q4WCgD@bQbOZWieIYkXDuOmAZsuhg.zmlp",
  "default_purchase_tax_rate_id": "fugiat elit aliqua "
}

Get Tax Rate

Get a tax rate by ID.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

tax_rate_id

required, string
GET
/v1/tax-rates/:tax_rate_id
1

List Tax Rates

List all tax rates.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

GET
/v1/tax-rates
1

Set Trade Approval

Approve or reject an invoice, credit not or order.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Data

required, object
PUT
/v1/approvals/trade
1
EXAMPLE BODY
{
  "trade_ids": [
    91120502
  ],
  "status": "Approved"
}

Set Payment Run Approval

Approve or reject a payment run.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

Data

required, object
PUT
/v1/approvals/payment-run
1