GitScrum / Docs

Invoices

Create, manage, and track invoices. Issue, send, and mark invoices as paid.

REST API — All endpoints require authentication via Bearer token. Include Authorization: Bearer {token} in every request. Tokens are managed in GitScrum Settings → API. Base URL: https://services.gitscrum.com — All request paths in this documentation are relative to this base URL.

Create, manage, and track invoices through their full lifecycle: draft, issue, send, and mark as paid.


List invoices

GET /company-invoices?company_slug={slug}

Returns all invoices in the workspace.

Query parameters

ParameterTypeDescription
company_slugstringWorkspace identifier
client_uuidstringFilter by client UUID
statusstringFilter: draft, issued, sent, paid

Response

{
  "data": [
    {
      "uuid": "inv-abc-123",
      "title": "January 2026 Services",
      "status": "sent",
      "client": {
        "uuid": "client-abc-123",
        "name": "Acme Corp"
      },
      "due_date": "2026-02-28",
      "currency": "USD",
      "subtotal": 8500,
      "tax": 0,
      "total": 8500,
      "issued_at": "2026-02-01T10:00:00Z",
      "paid_at": null,
      "created_at": "2026-01-28T09:00:00Z"
    }
  ]
}

Get invoice

GET /company-invoices/{uuid}?company_slug={slug}

Returns full invoice details including line items.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Response

{
  "data": {
    "uuid": "inv-abc-123",
    "title": "January 2026 Services",
    "status": "sent",
    "client": {
      "uuid": "client-abc-123",
      "name": "Acme Corp"
    },
    "due_date": "2026-02-28",
    "currency": "USD",
    "subtotal": 8500,
    "tax": 0,
    "total": 8500,
    "items": [
      {
        "description": "Frontend development",
        "quantity": 40,
        "unit_price": 150,
        "total": 6000
      },
      {
        "description": "Code review & QA",
        "quantity": 10,
        "unit_price": 250,
        "total": 2500
      }
    ],
    "issued_at": "2026-02-01T10:00:00Z",
    "paid_at": null,
    "created_at": "2026-01-28T09:00:00Z"
  }
}

Create invoice

POST /company-invoices

Creates a new invoice in draft status.

Request body

FieldTypeRequiredDescription
company_slugstringYesWorkspace identifier
contactcompanyuuidstringNoClient UUID
titlestringNoInvoice title
due_datestringNoDue date (YYYY-MM-DD)
currencystringNoUSD, EUR, or BRL
itemsarrayNoArray of line items

Each item in the items array:

FieldTypeDescription
descriptionstringLine item description
quantitynumberQuantity
unit_pricenumberPrice per unit

Example

curl -X POST https://services.gitscrum.com/company-invoices \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "company_slug": "acme",
    "contact_company_uuid": "client-abc-123",
    "title": "February 2026 Services",
    "due_date": "2026-03-31",
    "currency": "USD",
    "items": [
      {
        "description": "Development hours",
        "quantity": 60,
        "unit_price": 150
      }
    ]
  }'

Update invoice

PUT /company-invoices/{uuid}

Updates an existing invoice. Accepts the same optional fields as create plus company_slug.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Issue invoice

POST /company-invoices/{uuid}/issue?company_slug={slug}

Changes the invoice status from draft to issued.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Send invoice

POST /company-invoices/{uuid}/send?company_slug={slug}

Sends the invoice to the client via email.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Mark as paid

POST /company-invoices/{uuid}/paid?company_slug={slug}

Marks the invoice as paid.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Response

{
  "data": {
    "uuid": "inv-abc-123",
    "status": "paid",
    "paid_at": "2026-02-07T14:00:00Z"
  }
}

Delete invoice

DELETE /company-invoices/{uuid}?company_slug={slug}

Permanently deletes an invoice.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Invoice stats

GET /company-invoices/stats?company_slug={slug}

Returns invoice statistics for the workspace.

Response

{
  "data": {
    "total": 45,
    "draft": 3,
    "issued": 2,
    "sent": 8,
    "paid": 32,
    "total_value": 185000,
    "paid_value": 142000
  }
}

Add line item

POST /company-invoices/{uuid}/item?company_slug={slug}

Adds a line item to an invoice.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Request body

FieldTypeRequiredDescription
descriptionstringYesItem description
quantitynumberYesQuantity
unit_pricenumberYesPrice per unit

List line items

GET /company-invoices/{uuid}/items?company_slug={slug}

Returns all line items for an invoice.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Delete line item

DELETE /company-invoices/{uuid}/item/{id}?company_slug={slug}

Removes a line item from an invoice.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID
idintegerLine item ID

Mark as refunded

POST /company-invoices/{uuid}/refunded?company_slug={slug}

Marks the invoice as refunded.

Path parameters

ParameterTypeDescription
uuidstringInvoice UUID

Invoice lifecycle

draft → issued → sent → paid
  1. Create — invoice starts as draft
  2. Issue — locks the invoice, changes status to issued
  3. Send — delivers to client, changes status to sent
  4. Mark as paid — records payment, changes status to paid

Field reference

FieldTypeDescription
uuidstringInvoice unique identifier
titlestringInvoice title
statusstringdraft, issued, sent, or paid
clientobjectAssociated client
due_datestringPayment due date
currencystringCurrency code (USD/EUR/BRL)
subtotalnumberSubtotal before tax
taxnumberTax amount
totalnumberTotal amount
itemsarrayLine items
issued_atdatetimeWhen the invoice was issued
paid_atdatetimeWhen payment was recorded
created_atdatetimeRecord creation timestamp