Skip to main content

Invoice data JSON properties

Structure and meaning of each property in the JSON used by Comply to generate invoices in Shopify.

Written by Support

Comply can automatically save invoice data as metaobjects within Shopify. This enables further integrations with automations or external apps using the metaobjects/create webhook.

Learn how to configure invoice metaobjects in this article (Shopify Plus only).


Main object: Invoice

Property

Type

Description

invoiceNumber

String

Unique invoice number. Format: year-locationId-register-type-sequence

issuedAt

String (ISO 8601)

Issue date and time with timezone

invoiceType

String

Invoice type: F1 (full), F2 (simplified), R4 (rectified other), R5 (rectified simplified)

seriesId

String

Invoice series identifier

lineItems

Array<LineItem> / Null

Product lines. Present in invoices and returns, null in exchanges

lineItemsAdded

Array<LineItem> / Null

Added items. Present in exchanges only, null otherwise

lineItemsRemoved

Array<LineItem> / Null

Removed items. Present in exchanges only, null otherwise

paymentMethods

Array<PaymentMethod>

Payment methods used

taxBreakdown

Array<TaxBreakdown>

Tax breakdown by rate

grandTotalAmount

Number

Total invoice amount. Negative for refunds

currency

String

Invoice currency

shopifyOrderId

Number

Shopify order ID

rectifiedInvoice

RectifiedInvoice / Null

Data of the rectified invoice. Present only in rectified invoices

shopifyReturnId

Number / Null

Shopify return ID. Present in returns and exchanges

shopifyExchangeId

Number / Null

Shopify exchange ID. Present in exchanges only


Object: LineItem

Property

Type

Description

uuid

String (UUID)

Unique identifier for the line item. For sales, Shopify provides the cart UUID. For returns and exchanges, the line item ID

quantity

Number

Number of product units

title

String

Product name or description

price

Number

Unit price of the product

taxable

Boolean

Indicates whether the product is subject to tax

taxLines

Array<TaxLine>

Tax lines applied to the product

variantId

Number

Shopify product variant ID

isGiftCard

Boolean

Indicates whether the product is a gift card

discountAllocations

Array<DiscountAllocation>

Distributed discount allocations

properties

Object

Custom product properties

attributeUserId

String / Null

Attributed user ID. Null if not applicable

productId

Number

Shopify product ID

requiresSellingPlan

Boolean

Indicates whether the product requires a selling plan or subscription

hasSellingPlanGroups

Boolean

Indicates whether the product has selling plan groups

components

Array

Product components for bundles


Object: TaxLine

Property

Type

Description

price

Price

Object containing the tax amount and currency

title

String

Tax name (for example: "ES IVA")

uuid

String (UUID)

Unique identifier for the tax line

rate

Number

Tax rate in decimal format (for example: 0.1 = 10%)

enabled

Boolean

Indicates whether the tax is enabled


Object: Price

Property

Type

Description

amount

Number

Price or tax amount

currency

String

Currency (for example: "EUR")


Object: DiscountAllocation

Property

Type

Description

allocatedAmount

AllocatedAmount

Allocated discount amount


Object: AllocatedAmount

Property

Type

Description

amount

String

Discount amount allocated

currencyCode

String

Discount currency code


Object: PaymentMethod

Property

Type

Description

type

String

Payment method type (for example: "Cash")

amount

Number

Amount paid with this method. Can be negative for returns

currency

String

Payment currency


Object: TaxBreakdown

Property

Type

Description

taxRate

Number

Tax rate in decimal format

taxAmountCharged

Number

Total tax amount charged

taxableBaseAmount

Number

Taxable base amount for this tax


Important notes

  • In standard invoices: lineItems contains the products. lineItemsAdded and lineItemsRemoved are null.

  • In returns: shopifyReturnId is present. lineItems contains the returned products.

  • In exchanges: shopifyReturnId and shopifyExchangeId are present. lineItems is null, lineItemsAdded contains the new products, and lineItemsRemoved contains the returned ones.

  • Rectified invoices include the rectifiedInvoice object with the data of the original invoice.

Did this answer your question?