invoices

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-invoices"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/9ab6b521-7ddb-47dc-9408-a1830712bf92/social-card.svg?v=3e7ae33eec8b" alt="invoices" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/invoicesScope invoices:read

Invoices sent, and whether they were paid.

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/invoices" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
Example
{
  "data": [
    {}
  ]
}
Schema
dataobject[]required
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/invoicesScope invoices:write

Create a one-line draft invoice.

Request body

application/json
clientNamestringrequired
clientEmailstringrequired
descriptionstringrequired
amountCentsintegerrequired
currencystring
{
  "clientName": "string",
  "clientEmail": "string",
  "description": "string",
  "amountCents": 0,
  "currency": "string"
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/invoices" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"string","clientEmail":"string","description":"string","amountCents":0,"currency":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/invoices/{invoiceId}/sendScope invoices:write

Mark an invoice sent and email the client its link.

Parameters

invoiceIdstringpathrequired

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/invoices/{invoiceId}/send" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
GEThttps://linkyhub.net/api/v3/invoices/{invoiceId}Scope invoices:read

One invoice in full: client, lines, tax, totals and dates.

Parameters

invoiceIdstringpathrequired

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/invoices/{invoiceId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PUThttps://linkyhub.net/api/v3/invoices/{invoiceId}Scope invoices:write

Rewrite a draft or sent invoice: client, lines, tax, notes, due date. Paid and void ones are fixed.

Parameters

invoiceIdstringpathrequired

Request body

application/json
clientNamestringrequired
clientEmailstringrequired
clientAddressstring
lineItemsobject[]required
Show child parameters
descriptionstringrequired
quantitynumberrequired
Halves allowed: 1.5 days.
unitPriceCentsintegerrequired
currencystring
taxBasisPointsinteger
20% is 2000.
notesstring
dueAtstring
{
  "clientName": "string",
  "clientEmail": "string",
  "clientAddress": "string",
  "lineItems": [
    {
      "description": "string",
      "quantity": 0,
      "unitPriceCents": 0
    }
  ],
  "currency": "string",
  "taxBasisPoints": 0,
  "notes": "string",
  "dueAt": "2024-01-01T00:00:00Z"
}

Code samples

cURL
curl -X PUT "https://linkyhub.net/api/v3/invoices/{invoiceId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"string","clientEmail":"string","clientAddress":"string","lineItems":[{"description":"string","quantity":0,"unitPriceCents":0}],"currency":"string","taxBasisPoints":0,"notes":"string","dueAt":"2024-01-01T00:00:00Z"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
DELETEhttps://linkyhub.net/api/v3/invoices/{invoiceId}Scope invoices:write

Delete a draft invoice. Anything sent is voided instead, so numbering stays continuous.

Parameters

invoiceIdstringpathrequired

Code samples

cURL
curl -X DELETE "https://linkyhub.net/api/v3/invoices/{invoiceId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PATCHhttps://linkyhub.net/api/v3/invoices/{invoiceId}Scope invoices:write

Mark an invoice paid or void.

Parameters

invoiceIdstringpathrequired

Request body

application/json
statusstringrequired
PAID | VOID
{
  "status": "PAID"
}

Code samples

cURL
curl -X PATCH "https://linkyhub.net/api/v3/invoices/{invoiceId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"PAID"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /invoices

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated