logo
Index
Key Concepts
Authentication
Sandbox
Queries
API Reference
Authentication
Approvals
Set Trade Approval
Set Payment Run Approval
Companies
Current
Discover
Network
Get Network
List Networks
Connect
Create New Organisation
Get Accounting Contact
Create Or Update Accounting Contact
Purchases
Get Purchase
Update Purchase
List Purchases
Create Purchase
Update Purchase Status
Get Accounting Invoice
Create Or Update Accounting Invoice
Get Accounting Credit Note
Create Or Update Accounting Credit Note
Get Accounting Order
Create Or Update Accounting Order
Get Purchase Textract
Order Allocations
Sales
Get Sale
Update Sale
List Sales
Create Sale
Update Purchase Status
Get Accounting Invoice
Create Or Update Accounting Invoice
Get Accounting Credit Note
Create Or Update Accounting Credit Note
Get Accounting Order
Create Or Update Accounting Order
Tax rates
Get Tax Rate
List Tax Rates
Trading entities
Get Trading Entity
Update Trading Entity
Archive Trading Entity
List Trading Entities
Create Trading Entity
powered by zuplo
Sign in

Public Nook API

BASE URL
https://api.nook.io

Authentication

Sign into view and manage your API credentials

Purchases

ENDPOINTS
GET/v1/purchases/:purchase_id
POST/v1/purchases/:purchase_id
GET/v1/purchases
POST/v1/purchases
POST/v1/purchases/:purchase_id/status
GET/v1/purchases/accounting/invoice/:accounting_id
POST/v1/purchases/accounting/invoice/:accounting_id
GET/v1/purchases/accounting/credit-note/:accounting_id
POST/v1/purchases/accounting/credit-note/:accounting_id
GET/v1/purchases/accounting/order/:accounting_id
POST/v1/purchases/accounting/order/:accounting_id
GET/v1/purchases/:purchase_id/textract
POST/v1/purchases/order-allocations

Companies

ENDPOINTS
GET/v1/companies/current
GET/v1/companies/discover

Sales

ENDPOINTS
GET/v1/sales/:sale_id
POST/v1/sales/:sale_id
GET/v1/sales
POST/v1/sales
POST/v1/sales/:sale_id/status
GET/v1/sales/accounting/invoice/:accounting_id
POST/v1/sales/accounting/invoice/:accounting_id
GET/v1/sales/accounting/credit-note/:accounting_id
POST/v1/sales/accounting/credit-note/:accounting_id
GET/v1/sales/accounting/order/:accounting_id
POST/v1/sales/accounting/order/:accounting_id

Network

ENDPOINTS
GET/v1/network/:child_id
GET/v1/network
POST/v1/network/connect
POST/v1/network/new
GET/v1/network/accounting/contact/:accounting_id
POST/v1/network/accounting/contact/:accounting_id

Trading entities

ENDPOINTS
GET/v1/trading-entities/:trading_entity_id
PATCH/v1/trading-entities/:trading_entity_id
DELETE/v1/trading-entities/:trading_entity_id
GET/v1/trading-entities
POST/v1/trading-entities

Tax rates

ENDPOINTS
GET/v1/tax-rates/:tax_rate_id
GET/v1/tax-rates

Approvals

ENDPOINTS
PUT/v1/approvals/trade
PUT/v1/approvals/payment-run

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.

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
{
  "issue_date": "1933-06-12",
  "due_date": "1926-08-09",
  "order_id": 52824551,
  "inclusive_tax": true,
  "line_items": []
}

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, default: 0

limit

optional, integer, 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

accounting_id

optional, string, 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

deleted

optional, boolean, nullable, default: false

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
{
  "issue_date": "1900-12-09",
  "invoice_number": "ex ut mollit cupidatat",
  "order_number": "incididunt esse eiusmod",
  "use_defaults": false,
  "auto_submit": false,
  "supplier_trading_entity_id": -81636203,
  "currency_id": "GBR",
  "inclusive_tax": false,
  "visible_to_supplier": false
}

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_void_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

Get Purchase Textract

Get textract from PDF associated with 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.

Path Parameters

purchase_id

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

Order Allocations

Update allocations of invoices to orders

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

Order Allocations

required, object
POST
/v1/purchases/order-allocations
1
EXAMPLE BODY
{
  "allocations": [
    {
      "order_id": [],
      "order_line_item_id": -78767671,
      "invoice_id": [],
      "invoice_line_item_id": 75966053
    },
    {
      "order_id": [],
      "order_line_item_id": 81066547,
      "invoice_id": [],
      "invoice_line_item_id": -85007708
    }
  ]
}

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.

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
{
  "issue_date": "1911-04-23",
  "due_date": "1945-03-16",
  "order_number": "qui",
  "order_id": 88001504,
  "inclusive_tax": true,
  "type": "Invoice",
  "line_items": [],
  "visible_to_customer": false
}

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

accounting_id

optional, string, 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

deleted

optional, boolean, nullable, default: false

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_date": "1952-07-31",
  "issue_date": "1933-12-11",
  "order_number": "veniam",
  "auto_submit": false,
  "customer_trading_entity_id": -90589293,
  "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

sale_id

required, integer

Request Body

Data

required, object
POST
/v1/sales/:sale_id/status
1
EXAMPLE BODY
{
  "action": "accept_void_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/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
{
  "supplier_or_customer": "Both",
  "use_defaults": false,
  "country_id": "BE",
  "registration_number": "elit dolore Lorem pariatur consectetur"
}

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": "Individual",
  "country_id": "US",
  "given_name": "John",
  "family_name": "Smith",
  "date_of_birth": "1925-01-20T04:03:49.0Z",
  "document_type": "residency-permit",
  "document_number": "123456789",
  "document_issue_id": "US",
  "document_issue_date": "1908-01-22",
  "tax_number": "123456789"
}

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": "non laboris officia",
    "routing_code": "dolor occaecat consequat",
    "int_bic": "dolore cupidatat ipsum laboris ad",
    "int_iban": "irure dolore",
    "currency_id": "GBR",
    "bacs_account_number": "dolordes",
    "override_cop_check": true
  },
  "is_default": false,
  "default_email": "LNaJj-8xeJ1@wzweTcfKgQrhEDlqqhYp.pm",
  "default_sale_tax_rate_id": "nostrud officia cupidat",
  "default_purchase_tax_rate_id": "et velit",
  "metadata": {}
}

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": -32892635,
  "child_bank_account": {
    "routing_code": "sit aute Duis",
    "currency_id": "GBR",
    "bacs_account_number": "adipisic",
    "holder_name": "dolore"
  },
  "name": "Nook",
  "is_default": false,
  "default_email": "OTXlZB7kqktK@fLjKUNebOPQemZDBxPfTAd.lj",
  "default_sale_tax_rate_id": "irure in minim in amet",
  "default_sale_account_id": "offic",
  "default_purchase_tax_rate_id": "ullamco molli",
  "default_purchase_account_id": "Duis d",
  "use_defaults": false,
  "metadata": -69336436
}

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": [
    64618346,
    -43406003,
    -86698686,
    -66589250,
    13662092
  ],
  "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