invoices
GET
https://linkyhub.net/api/v3 /invoices Scope invoices:readInvoices 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[]requiredHeaders
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Example
{
"error": "string",
"message": "string"
}Schema
errorstringrequiredA stable code to branch on, e.g. insufficient_scope.
messagestringrequiredA sentence to show a person.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /invoices Scope invoices:writeCreate a one-line draft invoice.
Request body
application/json
clientNamestringrequiredclientEmailstringrequireddescriptionstringrequiredamountCentsintegerrequiredcurrencystring{
"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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /invoices/{invoiceId}/send Scope invoices:writeMark an invoice sent and email the client its link.
Parameters
invoiceIdstringpathrequiredCode 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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
GET
https://linkyhub.net/api/v3 /invoices/{invoiceId} Scope invoices:readOne invoice in full: client, lines, tax, totals and dates.
Parameters
invoiceIdstringpathrequiredCode 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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PUT
https://linkyhub.net/api/v3 /invoices/{invoiceId} Scope invoices:writeRewrite a draft or sent invoice: client, lines, tax, notes, due date. Paid and void ones are fixed.
Parameters
invoiceIdstringpathrequiredRequest body
application/json
clientNamestringrequiredclientEmailstringrequiredclientAddressstringlineItemsobject[]requiredShow child parameters
descriptionstringrequiredquantitynumberrequiredHalves allowed: 1.5 days.
unitPriceCentsintegerrequiredcurrencystringtaxBasisPointsinteger20% is 2000.
notesstringdueAtstring{
"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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
DELETE
https://linkyhub.net/api/v3 /invoices/{invoiceId} Scope invoices:writeDelete a draft invoice. Anything sent is voided instead, so numbering stays continuous.
Parameters
invoiceIdstringpathrequiredCode 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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PATCH
https://linkyhub.net/api/v3 /invoices/{invoiceId} Scope invoices:writeMark an invoice paid or void.
Parameters
invoiceIdstringpathrequiredRequest body
application/json
statusstringrequired{
"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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /invoices
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated