Credit Notes

Properties

  • Name
    object
    Type
    string
    Description

    Type of object is always creditNote.

  • Name
    id
    Type
    string
    Description

    Unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji
  • Name
    invoice
    Type
    string
    Description

    The unique identifier for the invoice that the credit note applies to.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
  • Name
    lineItems
    Type
    array
    Description
    The line items for the credit note.
  • Name
    status
    Type
    string
    Description

    The status of the credit note. It can have one of the following values:

    • issued: The credit note was issued.
    • voided: The credit note was voided and no longer has any effect.
    Allowed values: issued, voided
  • Name
    subtotal
    Type
    object
    Description
    The total amount credited before any taxes or fees.
  • Name
    tax
    Type
    object
    Description
    The sum of the amounts in taxes credited for each line item.
  • Name
    total
    Type
    object
    Description
    The total amount credited after taxes and fees.
  • Name
    createdAt
    Type
    string
    Description

    Time when the credit note was created.

    Example: 2024-06-14T19:38:34Z
  • Name
    voidedAt
    Type
    nullable string
    Description

    Time when the credit note was voided.

    Example: 2024-06-14T19:38:34Z

Response

{
  "object": "creditNote",
  "id": "crn_0SNlurA049MEWV49X25tqzNV2jji",
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "status": "issued",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 999,
    "currency": "USD"
  },
  "total": {
    "amount": 999,
    "currency": "USD"
  },
  "createdAt": "2024-06-14T19:38:34Z",
  "voidedAt": "2024-06-14T19:38:34Z"
}

GET/projects/{project}/creditNotes/{creditNote}

Retrieve a credit note

Retrieves the details of an existing credit note.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    creditNote
    Type
    string
    required
    Description

    The unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always creditNote.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier for the invoice that the credit note applies to.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
  • Name
    lineItems
    Type
    array
    required
    Description
    The line items for the credit note.
  • Name
    status
    Type
    string
    required
    Description

    The status of the credit note. It can have one of the following values:

    • issued: The credit note was issued.
    • voided: The credit note was voided and no longer has any effect.
    Allowed values: issued, voided
  • Name
    subtotal
    Type
    object
    required
    Description
    The total amount credited before any taxes or fees.
  • Name
    tax
    Type
    object
    required
    Description
    The sum of the amounts in taxes credited for each line item.
  • Name
    total
    Type
    object
    required
    Description
    The total amount credited after taxes and fees.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the credit note was created.

    Example: 2024-06-14T19:38:34Z
  • Name
    voidedAt
    Type
    nullable string
    required
    Description

    Time when the credit note was voided.

    Example: 2024-06-14T19:38:34Z

Request

GET
/projects/{project}/creditNotes/{creditNote}
curl https://api.gigs.com/projects/{project}/creditNotes/{creditNote} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "creditNote",
  "id": "crn_0SNlurA049MEWV49X25tqzNV2jji",
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "lineItems": [
    {
      "amount": {
        "amount": 999,
        "currency": "USD"
      },
      "invoiceLineItem": "lin_0SNlurA049MEWV11QUKZGDMxJmKe",
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 200,
            "currency": "USD"
          },
          "inclusive": false,
          "name": "State Sales Tax",
          "invoiceTax": "itx_0SNlurA049MEWV5Mw7cjrxFUo2Y3"
        }
      ],
      "total": {
        "amount": 1199,
        "currency": "USD"
      }
    }
  ],
  "status": "issued",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "createdAt": "2024-06-14T19:38:34Z",
  "voidedAt": "2024-06-14T19:38:34Z"
}

GET/projects/{project}/creditNotes

List all credit notes

Returns a list of credit notes.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs

Query Parameters

  • Name
    after
    Type
    string
    Description

    A cursor for use in pagination. The after parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.

  • Name
    before
    Type
    string
    Description

    A cursor for use in pagination. The before parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.

  • Name
    limit
    Type
    integer
    Description

    The limit of items to be returned in the list, between 0 and 200.

    Default: 10
    >= 0
    <= 200
  • Name
    invoice
    Type
    string
    Description

    The unique identifier for the invoice to be filtered by.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
  • Name
    status
    Type
    array
    Description

    A comma-separated list of statuses to filter the credit notes by.

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always list.

  • Name
    items
    Type
    array
    required
    Description
    List of objects of type `creditNote`.
  • Name
    moreItemsAfter
    Type
    nullable string
    required
    Description

    A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.

  • Name
    moreItemsBefore
    Type
    nullable string
    required
    Description

    A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.

Request

GET
/projects/{project}/creditNotes
curl https://api.gigs.com/projects/{project}/creditNotes \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "list",
  "items": [
    {
      "object": "creditNote",
      "id": "crn_0SNlurA049MEWV49X25tqzNV2jji",
      "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
      "lineItems": [
        {
          "amount": {
            "amount": 999,
            "currency": "USD"
          },
          "invoiceLineItem": "lin_0SNlurA049MEWV11QUKZGDMxJmKe",
          "tax": {
            "amount": 200,
            "currency": "USD"
          },
          "taxes": [
            {
              "amount": {
                "amount": 200,
                "currency": "USD"
              },
              "inclusive": false,
              "name": "State Sales Tax",
              "invoiceTax": "itx_0SNlurA049MEWV5Mw7cjrxFUo2Y3"
            }
          ],
          "total": {
            "amount": 1199,
            "currency": "USD"
          }
        }
      ],
      "status": "issued",
      "subtotal": {
        "amount": 999,
        "currency": "USD"
      },
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "total": {
        "amount": 1199,
        "currency": "USD"
      },
      "createdAt": "2024-06-14T19:38:34Z",
      "voidedAt": "2024-06-14T19:38:34Z"
    }
  ],
  "moreItemsAfter": null,
  "moreItemsBefore": null
}

POST/projects/{project}/creditNotes

Create a credit note

Creates a new credit note for an invoice. The full amount of the invoice will be credited, including all taxes and fees. Non-refundable taxes will still have to be filed with the tax authorities.

Body

  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier for the invoice that the credit note applies to.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always creditNote.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier for the invoice that the credit note applies to.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
  • Name
    lineItems
    Type
    array
    required
    Description
    The line items for the credit note.
  • Name
    status
    Type
    string
    required
    Description

    The status of the credit note. It can have one of the following values:

    • issued: The credit note was issued.
    • voided: The credit note was voided and no longer has any effect.
    Allowed values: issued, voided
  • Name
    subtotal
    Type
    object
    required
    Description
    The total amount credited before any taxes or fees.
  • Name
    tax
    Type
    object
    required
    Description
    The sum of the amounts in taxes credited for each line item.
  • Name
    total
    Type
    object
    required
    Description
    The total amount credited after taxes and fees.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the credit note was created.

    Example: 2024-06-14T19:38:34Z
  • Name
    voidedAt
    Type
    nullable string
    required
    Description

    Time when the credit note was voided.

    Example: 2024-06-14T19:38:34Z

Request

POST
/projects/{project}/creditNotes
curl https://api.gigs.com/projects/{project}/creditNotes \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"invoice\":\"inv_0SNlurA049MEWV1QTRqvd18YuG25\"}"

Response

{
  "object": "creditNote",
  "id": "crn_0SNlurA049MEWV49X25tqzNV2jji",
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "lineItems": [
    {
      "amount": {
        "amount": 999,
        "currency": "USD"
      },
      "invoiceLineItem": "lin_0SNlurA049MEWV11QUKZGDMxJmKe",
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 200,
            "currency": "USD"
          },
          "inclusive": false,
          "name": "State Sales Tax",
          "invoiceTax": "itx_0SNlurA049MEWV5Mw7cjrxFUo2Y3"
        }
      ],
      "total": {
        "amount": 1199,
        "currency": "USD"
      }
    }
  ],
  "status": "issued",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "createdAt": "2024-06-14T19:38:34Z",
  "voidedAt": "2024-06-14T19:38:34Z"
}

POST/projects/{project}/creditNotes/{creditNote}/void

Void a credit note

Marks the credit note as void. This reverses the credited amount in the invoice and reported taxes.

Path Parameters

  • Name
    project
    Type
    string
    required
    Description

    The unique identifier for the project.

    Example: gigs
  • Name
    creditNote
    Type
    string
    required
    Description

    The unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji

Response Schemas

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always creditNote.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the credit note.

    Example: crn_0SNlurA049MEWV49X25tqzNV2jji
  • Name
    invoice
    Type
    string
    required
    Description

    The unique identifier for the invoice that the credit note applies to.

    Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
  • Name
    lineItems
    Type
    array
    required
    Description
    The line items for the credit note.
  • Name
    status
    Type
    string
    required
    Description

    The status of the credit note. It can have one of the following values:

    • issued: The credit note was issued.
    • voided: The credit note was voided and no longer has any effect.
    Allowed values: issued, voided
  • Name
    subtotal
    Type
    object
    required
    Description
    The total amount credited before any taxes or fees.
  • Name
    tax
    Type
    object
    required
    Description
    The sum of the amounts in taxes credited for each line item.
  • Name
    total
    Type
    object
    required
    Description
    The total amount credited after taxes and fees.
  • Name
    createdAt
    Type
    string
    required
    Description

    Time when the credit note was created.

    Example: 2024-06-14T19:38:34Z
  • Name
    voidedAt
    Type
    nullable string
    required
    Description

    Time when the credit note was voided.

    Example: 2024-06-14T19:38:34Z

Request

POST
/projects/{project}/creditNotes/{creditNote}/void
curl https://api.gigs.com/projects/{project}/creditNotes/{creditNote}/void \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{
  "object": "creditNote",
  "id": "crn_0SNlurA049MEWV49X25tqzNV2jji",
  "invoice": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
  "lineItems": [
    {
      "amount": {
        "amount": 999,
        "currency": "USD"
      },
      "invoiceLineItem": "lin_0SNlurA049MEWV11QUKZGDMxJmKe",
      "tax": {
        "amount": 200,
        "currency": "USD"
      },
      "taxes": [
        {
          "amount": {
            "amount": 200,
            "currency": "USD"
          },
          "inclusive": false,
          "name": "State Sales Tax",
          "invoiceTax": "itx_0SNlurA049MEWV5Mw7cjrxFUo2Y3"
        }
      ],
      "total": {
        "amount": 1199,
        "currency": "USD"
      }
    }
  ],
  "status": "issued",
  "subtotal": {
    "amount": 999,
    "currency": "USD"
  },
  "tax": {
    "amount": 200,
    "currency": "USD"
  },
  "total": {
    "amount": 1199,
    "currency": "USD"
  },
  "createdAt": "2024-06-14T19:38:34Z",
  "voidedAt": "2024-06-14T19:38:34Z"
}