younifyd
Menu

Create Credit Note Allocation

Creates allocation for a specific credit note

PUT/CreditNotes/{CreditNoteID}/Allocations

Use it in a workflow

  1. Add a step and choose the Xero connector.
  2. Pick the Create Credit Note Allocation action (under Xero).
  3. Fill in the fields below, then reference the result from later steps as {{createCreditNoteAllocation.response.data}}.

Request

Path parameters

CreditNoteIDstring (uuid)required

Unique identifier for a Credit Note

Query parameters

summarizeErrorsboolean

If false return 200 OK and mix of successfully created objects and any with validation errors

Default false

Headers

xero-tenant-idstringrequired

Xero identifier for Tenant

Idempotency-Keystring

This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Request body

Enter the body as JSON in the step's Body field.

Allocationsarray<object>
AllocationIDstring (uuid)

Xero generated unique identifier

Invoiceobjectrequired40 fields
Overpaymentobject21 fields
Prepaymentobject23 fields
CreditNoteobject

Circular reference: #/components/schemas/CreditNote

Amountnumber (double)required

the amount being applied to the invoice

Datestringrequired

the date the allocation is applied YYYY-MM-DD.

IsDeletedboolean

A flag that returns true when the allocation is succesfully deleted

StatusAttributeStringstring

A string to indicate if a invoice status

ValidationErrorsarray<object>1 fields

Displays array of validation error messages from the API

json
{
  "Allocations": [
    {
      "Invoice": {
        "Type": "ACCPAY",
        "Contact": {
          "ContactID": "00000000-0000-0000-0000-000000000000",
          "MergedToContactID": "00000000-0000-0000-0000-000000000000",
          "ContactNumber": "string",
          "AccountNumber": "string",
          "ContactStatus": "ACTIVE",
          "Name": "string",
          "FirstName": "string",
          "LastName": "string",
          "CompanyNumber": "string",
          "EmailAddress": "string",
          "ContactPersons": [
            {
              "FirstName": null,
              "LastName": null,
              "EmailAddress": null,
              "IncludeInEmails": null
            }
          ],
          "BankAccountDetails": "string"
        },
        "LineItems": [
          {
            "LineItemID": "00000000-0000-0000-0000-000000000000",
            "Description": "string",
            "Quantity": 0,
            "UnitAmount": 0,
            "ItemCode": "string",
            "AccountCode": "string",
            "AccountID": "00000000-0000-0000-0000-000000000000",
            "TaxType": "string",
            "TaxAmount": 0,
            "Item": {
              "Code": null,
              "Name": null,
              "ItemID": null
            },
            "LineAmount": 0,
            "Tracking": [
              null
            ]
          }
        ],
        "Date": "string",
        "DueDate": "string",
        "LineAmountTypes": "Exclusive",
        "InvoiceNumber": "string",
        "Reference": "string",
        "BrandingThemeID": "00000000-0000-0000-0000-000000000000",
        "Url": "string",
        "CurrencyCode": "AED",
        "CurrencyRate": 0
      },
      "Amount": 0,
      "Date": "string",
      "AllocationID": "00000000-0000-0000-0000-000000000000",
      "Overpayment": {
        "Type": {},
        "Contact": {},
        "Date": {},
        "Status": {},
        "LineAmountTypes": {},
        "LineItems": {},
        "SubTotal": {},
        "TotalTax": {},
        "Total": {},
        "UpdatedDateUTC": {},
        "UpdatedDateUTCString": {},
        "CurrencyCode": {}
      },
      "Prepayment": {
        "Type": {},
        "Contact": {},
        "Date": {},
        "Status": {},
        "LineAmountTypes": {},
        "LineItems": {},
        "SubTotal": {},
        "TotalTax": {},
        "Total": {},
        "Reference": {},
        "InvoiceNumber": {},
        "UpdatedDateUTC": {}
      },
      "CreditNote": {},
      "IsDeleted": false,
      "StatusAttributeString": "string",
      "ValidationErrors": [
        {
          "Message": "string"
        }
      ]
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{createCreditNoteAllocation.response.data.<field>}}.

Allocationsarray<object>
AllocationIDstring (uuid)

Xero generated unique identifier

Invoiceobjectrequired40 fields
Overpaymentobject21 fields
Prepaymentobject23 fields
CreditNoteobject

Circular reference: #/components/schemas/CreditNote

Amountnumber (double)required

the amount being applied to the invoice

Datestringrequired

the date the allocation is applied YYYY-MM-DD.

IsDeletedboolean

A flag that returns true when the allocation is succesfully deleted

StatusAttributeStringstring

A string to indicate if a invoice status

ValidationErrorsarray<object>1 fields

Displays array of validation error messages from the API

json
{
  "Allocations": [
    {
      "Invoice": {
        "Type": "ACCPAY",
        "Contact": {
          "ContactID": "00000000-0000-0000-0000-000000000000",
          "MergedToContactID": "00000000-0000-0000-0000-000000000000",
          "ContactNumber": "string",
          "AccountNumber": "string",
          "ContactStatus": "ACTIVE",
          "Name": "string",
          "FirstName": "string",
          "LastName": "string",
          "CompanyNumber": "string",
          "EmailAddress": "string",
          "ContactPersons": [
            {
              "FirstName": null,
              "LastName": null,
              "EmailAddress": null,
              "IncludeInEmails": null
            }
          ],
          "BankAccountDetails": "string"
        },
        "LineItems": [
          {
            "LineItemID": "00000000-0000-0000-0000-000000000000",
            "Description": "string",
            "Quantity": 0,
            "UnitAmount": 0,
            "ItemCode": "string",
            "AccountCode": "string",
            "AccountID": "00000000-0000-0000-0000-000000000000",
            "TaxType": "string",
            "TaxAmount": 0,
            "Item": {
              "Code": null,
              "Name": null,
              "ItemID": null
            },
            "LineAmount": 0,
            "Tracking": [
              null
            ]
          }
        ],
        "Date": "string",
        "DueDate": "string",
        "LineAmountTypes": "Exclusive",
        "InvoiceNumber": "string",
        "Reference": "string",
        "BrandingThemeID": "00000000-0000-0000-0000-000000000000",
        "Url": "string",
        "CurrencyCode": "AED",
        "CurrencyRate": 0
      },
      "Amount": 0,
      "Date": "string",
      "AllocationID": "00000000-0000-0000-0000-000000000000",
      "Overpayment": {
        "Type": {},
        "Contact": {},
        "Date": {},
        "Status": {},
        "LineAmountTypes": {},
        "LineItems": {},
        "SubTotal": {},
        "TotalTax": {},
        "Total": {},
        "UpdatedDateUTC": {},
        "UpdatedDateUTCString": {},
        "CurrencyCode": {}
      },
      "Prepayment": {
        "Type": {},
        "Contact": {},
        "Date": {},
        "Status": {},
        "LineAmountTypes": {},
        "LineItems": {},
        "SubTotal": {},
        "TotalTax": {},
        "Total": {},
        "Reference": {},
        "InvoiceNumber": {},
        "UpdatedDateUTC": {}
      },
      "CreditNote": {},
      "IsDeleted": false,
      "StatusAttributeString": "string",
      "ValidationErrors": [
        {
          "Message": "string"
        }
      ]
    }
  ]
}

Need more? See the Xero guide for connection setup and behaviour shared by every action.