curl --request GET \
--url https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"resource_type": "invoices",
"resource_id": "<string>",
"team_id": "<string>",
"livemode": true,
"storage_project_id": "<string>",
"document": {
"livemode": true,
"files": {
"pdf": "<string>",
"xml": "<string>"
},
"team": "<string>",
"id": "<string>",
"uuid": "<string>",
"client": {
"id": "<string>",
"address": {
"country": "<string>",
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"exterior": "<string>",
"interior": "<string>",
"municipality": "<string>",
"neighborhood": "<string>"
},
"name": "<string>",
"company": "<string>",
"phone": "<string>",
"email": "<string>",
"bcc": [
"<string>"
],
"metadata": {},
"is_valid": true,
"from": "<string>",
"legal_name": "<string>",
"livemode": true,
"owner": "<string>",
"tax_id": "<string>",
"use": "<string>",
"tax_system": "<string>",
"team": "<string>",
"created_at": 123,
"efos": {
"is_valid": true
},
"fiscal_validation": {
"status": "<string>",
"message": "<string>"
},
"sat_status": {
"is_risky": true,
"efos": {
"is_valid": true
},
"hits": [
{
"list": "<string>",
"label": "<string>",
"source": "<string>",
"is_risky": true,
"detail": {}
}
],
"checked_at": 123
},
"defaults": {
"keep_full_legal_name": true,
"issue_automatic_invoices": true,
"issue_invoiceable_receipts": true
},
"document_type": "<string>",
"organization_type": 123,
"tribute_code": "<string>",
"fiscal_responsibilities": [
"<string>"
],
"dv": "<string>",
"municipality_code": "<string>"
},
"created_at": 123,
"currency": "<string>",
"exchange_rate": 123,
"total": 123,
"subtotal": 123,
"taxes": 123,
"discount": 123,
"withholding_taxes": 123,
"series": "<string>",
"folio_number": 123,
"invoice_type": "<string>",
"use": "<string>",
"payment_form": "<string>",
"payment_method": "<string>",
"status": "<string>",
"owner": "<string>",
"from": "<string>",
"items": [
{
"id": "<string>",
"description": "<string>",
"product_key": "<string>",
"quantity": 123,
"unit_price": 123,
"unit_key": "<string>",
"unit_name": "<string>",
"sku": "<string>",
"taxability": "<string>",
"taxes": [
{
"base": 123,
"rate": 123,
"type": "<string>",
"factor": "<string>",
"inclusive": true,
"withholding": true
}
],
"discount": 123,
"customs_request": "<string>",
"complement": "<string>",
"property_tax_account": "<string>",
"third_party": {
"legal_name": "<string>",
"tax_id": "<string>",
"tax_system": "<string>",
"zip": "<string>"
}
}
],
"payments": [
"<string>"
],
"invoices": [
"<string>"
],
"stamp": {
"sello": "<string>",
"stamp_at": 123,
"provider": "<string>"
},
"cancellation": {
"cancellation_status": "<string>",
"cancelled_at": 123,
"motive": "<string>",
"code": "<string>",
"requested_by": "<string>",
"cancellation_receipt": "<string>",
"cancellation_type": "<string>",
"last_checked": 123,
"requested_at": 123,
"substitution_uuid": "<string>"
},
"verification_url": "<string>",
"exports": "<string>",
"addenda": "<string>",
"invoice_pdf_notes": "<string>",
"idempotency_key": "<string>",
"billing_account": "<string>",
"date": 123,
"payment_conditions": "<string>",
"global": {
"year": 123,
"months": "<string>",
"periodicity": "<string>"
},
"related_documents": [
{
"relationship": "<string>",
"documents": [
"<string>"
]
}
],
"complements": [
{
"type": "<string>",
"data": "<string>"
}
],
"metadata": {},
"emails": [
"<string>"
],
"issuer_info": {
"legal_name": "<string>",
"tax_id": "<string>",
"tax_system": "<string>",
"zip": "<string>"
},
"namespaces": [
{
"prefix": "<string>",
"uri": "<string>",
"schema_location": "<string>"
}
],
"payment_complements": 123,
"last_balance": 123,
"installments": 123,
"automations": [
{
"type": "<string>",
"from": "<string>",
"ref": "<string>",
"action": "<string>"
}
]
},
"file_status": {
"pdf": "available",
"xml": "available"
}
}
}Read an authorized historical invoice or receipt
Independently rechecks the original credential, current payment-link and target module viewing permission, exact document ID, team and current mode. Saved and nested references grant no authority. Current runtime project bucket and exact invoice/files-subdocument storage path are enforced. No document generation, download-token minting, Storage metadata writes or provider writes occur. Current authority and document/files snapshots are checked again after read-only Storage awaits. Returns the entire mapped public invoice/receipt DTO. files.pdf and files.xml are existing safe HTTPS URLs or null; file_status separately reports existing file availability. Ordinary history reads never return inline bytes.
curl --request GET \
--url https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/payments/links/{linkId}/history/{resourceType}/{resourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"resource_type": "invoices",
"resource_id": "<string>",
"team_id": "<string>",
"livemode": true,
"storage_project_id": "<string>",
"document": {
"livemode": true,
"files": {
"pdf": "<string>",
"xml": "<string>"
},
"team": "<string>",
"id": "<string>",
"uuid": "<string>",
"client": {
"id": "<string>",
"address": {
"country": "<string>",
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"exterior": "<string>",
"interior": "<string>",
"municipality": "<string>",
"neighborhood": "<string>"
},
"name": "<string>",
"company": "<string>",
"phone": "<string>",
"email": "<string>",
"bcc": [
"<string>"
],
"metadata": {},
"is_valid": true,
"from": "<string>",
"legal_name": "<string>",
"livemode": true,
"owner": "<string>",
"tax_id": "<string>",
"use": "<string>",
"tax_system": "<string>",
"team": "<string>",
"created_at": 123,
"efos": {
"is_valid": true
},
"fiscal_validation": {
"status": "<string>",
"message": "<string>"
},
"sat_status": {
"is_risky": true,
"efos": {
"is_valid": true
},
"hits": [
{
"list": "<string>",
"label": "<string>",
"source": "<string>",
"is_risky": true,
"detail": {}
}
],
"checked_at": 123
},
"defaults": {
"keep_full_legal_name": true,
"issue_automatic_invoices": true,
"issue_invoiceable_receipts": true
},
"document_type": "<string>",
"organization_type": 123,
"tribute_code": "<string>",
"fiscal_responsibilities": [
"<string>"
],
"dv": "<string>",
"municipality_code": "<string>"
},
"created_at": 123,
"currency": "<string>",
"exchange_rate": 123,
"total": 123,
"subtotal": 123,
"taxes": 123,
"discount": 123,
"withholding_taxes": 123,
"series": "<string>",
"folio_number": 123,
"invoice_type": "<string>",
"use": "<string>",
"payment_form": "<string>",
"payment_method": "<string>",
"status": "<string>",
"owner": "<string>",
"from": "<string>",
"items": [
{
"id": "<string>",
"description": "<string>",
"product_key": "<string>",
"quantity": 123,
"unit_price": 123,
"unit_key": "<string>",
"unit_name": "<string>",
"sku": "<string>",
"taxability": "<string>",
"taxes": [
{
"base": 123,
"rate": 123,
"type": "<string>",
"factor": "<string>",
"inclusive": true,
"withholding": true
}
],
"discount": 123,
"customs_request": "<string>",
"complement": "<string>",
"property_tax_account": "<string>",
"third_party": {
"legal_name": "<string>",
"tax_id": "<string>",
"tax_system": "<string>",
"zip": "<string>"
}
}
],
"payments": [
"<string>"
],
"invoices": [
"<string>"
],
"stamp": {
"sello": "<string>",
"stamp_at": 123,
"provider": "<string>"
},
"cancellation": {
"cancellation_status": "<string>",
"cancelled_at": 123,
"motive": "<string>",
"code": "<string>",
"requested_by": "<string>",
"cancellation_receipt": "<string>",
"cancellation_type": "<string>",
"last_checked": 123,
"requested_at": 123,
"substitution_uuid": "<string>"
},
"verification_url": "<string>",
"exports": "<string>",
"addenda": "<string>",
"invoice_pdf_notes": "<string>",
"idempotency_key": "<string>",
"billing_account": "<string>",
"date": 123,
"payment_conditions": "<string>",
"global": {
"year": 123,
"months": "<string>",
"periodicity": "<string>"
},
"related_documents": [
{
"relationship": "<string>",
"documents": [
"<string>"
]
}
],
"complements": [
{
"type": "<string>",
"data": "<string>"
}
],
"metadata": {},
"emails": [
"<string>"
],
"issuer_info": {
"legal_name": "<string>",
"tax_id": "<string>",
"tax_system": "<string>",
"zip": "<string>"
},
"namespaces": [
{
"prefix": "<string>",
"uri": "<string>",
"schema_location": "<string>"
}
],
"payment_complements": 123,
"last_balance": 123,
"installments": 123,
"automations": [
{
"type": "<string>",
"from": "<string>",
"ref": "<string>",
"action": "<string>"
}
]
},
"file_status": {
"pdf": "available",
"xml": "available"
}
}
}Authorizations
Authentication Method: HTTP Bearer token.
The runtime requires the literal Bearer prefix — a bare token in the
Authorization header is rejected with 401 unauthorized.
Header Format: Authorization: Bearer YOUR_API_KEY
Your API key is a JWT. Live keys operate on live data (livemode: true);
test keys operate on isolated test data (livemode: false).
Get your key at: app.gigstack.pro/settings?tab=api
Errors: credential failures are answered by the authentication layer with a raw
{ "message": … } body, not the standardized envelope — 401 for a missing, malformed or
expired token, 403 for a revoked key or a plan without API access. See the Unauthorized
and AuthForbidden responses.
Path Parameters
invoices, receipts ^[A-Za-z0-9_-]{1,160}$Query Parameters
gigstack Connect: Target team ID for multi-team access.
Requires gigstack Connect enabled on your team and shared billing account.
Also requires the multipleIssuerAccounts feature on your plan. Requests targeting a
team other than the one your API key belongs to return 403 without it.
Only API keys can use it: an OAuth access token sent with another team's id is rejected with
403 Team mismatch with OAuth token.
Optional — omit it entirely unless you are acting on another team. It deliberately
carries no example value so generated snippets do not emit ?team=undefined; when the
parameter is absent, the team is derived from your API key.
Example: ?team=team_xyz789