3. Object & Field Mapping

Understand which fields map from the REST based return payloads to the equivalent GraphQL return payloads.

Introduction

In this section we map the fields returned by the REST endpoints to its equivalent in the GraphQL schema.

Adverts

List Adverts

GET /api/v2/client/adverts

REST FieldGraphQL ObjectGraphQL Field
data.idAdvertlegacyId
data.attributes.titleAdverttitle
data.attributes.descriptionAdvertdescription
data.attributes.sale_typeAdvertsaleType
data.attributes.publishedAdvertpublished
data.attributes.codeAdvertcode
data.attributes.sale_priceAdvertlowestPrice
data.attributes.priceAdvertlowestOriginalPrice
data.attributes.conditionAdvertcondition
data.attributes.yearAdvertyear
data.attributes.external_idAdvertexternalId
data.attributes.notesAdvertN/a
data.attributes.specificationsAdvertspecifications
data.attributes.domestic_shipping_costAdvertbaseDomesticShippingCost
data.attributes.international_shipping_costAdvertbaseInternationalShippingCost
data.attributes.youtube_video_urlAdvertyoutubeVideoUrl
data.attributes.origin_country_codeAdvertoriginCountryCode
data.attributes.tax_codeAdverttaxCode
data.attributes.therapeutic_goods_labelling_enabledAdverttherapeuticGoodsLabellingEnabled
data.max_purchase_quantityAdvertmaxPurchaseQuantity
data.min_purchase_quantityAdvertminPurchaseQuantity
data.item_tax_rateAdvertitemTaxRate
data.item_tax_rate_percentageAdvertN/a
data.vettedAdvertvetted
data.vetting_rejected_reasonAdvertvettingRejectedReason
data.features.product_featuresAdvertproductFeatures
data.features.product_detailsAdvertadvertOptionValues.nodes.optionValue.name
advertOptionValues.nodes.optionType.name
data.relationships.taxon.data.typeAdverttaxonNullable
data.relationships.taxon.data.idAdverttaxonNullable.legacyId
data.relationships.brand.data.typeAdvertbrand
data.relationships.taxon.data.idAdvertN/a


Single Advert with Variants

GET /api/v2/client/adverts/1/?include=variants

REST FieldGraphQL ObjectGraphQL Field
data.idAdvertlegacyId
data.attributes.titleAdverttitle
data.attributes.descriptionAdvertdescription
data.attributes.sale_typeAdvertsaleType
data.attributes.publishedAdvertpublished
data.attributes.codeAdvertcode
data.attributes.sale_priceAdvertlowestPrice
data.attributes.priceAdvertlowestOriginalPrice
data.attributes.conditionAdvertcondition
data.attributes.yearAdvertyear
data.attributes.external_idAdvertexternalId
data.attributes.notesAdvertN/a
data.attributes.specificationsAdvertspecifications
data.attributes.domestic_shipping_costAdvertbaseDomesticShippingCost
data.attributes.international_shipping_costAdvertbaseInternationalShippingCost
data.attributes.youtube_video_urlAdvertyoutubeVideoUrl
data.attributes.origin_country_codeAdvertoriginCountryCode
data.attributes.tax_codeAdverttaxCode
data.attributes.therapeutic_goods_labelling_enabledAdverttherapeuticGoodsLabellingEnabled
data.max_purchase_quantityAdvertmaxPurchaseQuantity
data.min_purchase_quantityAdvertminPurchaseQuantity
data.item_tax_rateAdvertitemTaxRate
data.item_tax_rate_percentageAdvertN/a
data.vettedAdvertvetted
data.vetting_rejected_reasonAdvertvettingRejectedReason
data.features.product_featuresAdvertproductFeatures
data.features.product_detailsAdvertadvertOptionValues.nodes.optionValue.name
advertOptionValues.nodes.optionType.name
data.relationships.taxon.data.typeAdverttaxonNullable
data.relationships.taxon.data.idAdverttaxonNullable.legacyId
data.relationships.brand.data.typeAdvertbrand
data.relationships.taxon.data.idAdvertN/a
data.relationships.variants.data.typeAdvertvariants
data.relationships.variants.data.idAdvertvariants.nodes.legacyId
Included Taxons
included.attributes.nameAdverttaxonNullable.displayName
included.attributes.tree_nameAdverttaxonNullable.treeName
included.attributes.slugAdverttaxonNullable.urlSlug
included.attributes.taxon_typeAdverttaxonNullable.taxonType
Included Brands
included.attributes.nameAdverttaxonNullable.name
included.attributes.slugAdverttaxonNullable.slug
Include Variants
included.idAdvertvariants.nodes.legacyId
included.attributes.skuAdvertvariants.nodes.sku
included.attributes.count_on_handAdvertvariants.nodes.countOnHand
included.attributes.notesAdvertvariants.nodes.notes
included.attributes.external_idAdvertvariants.nodes.externalId
included.attributes.sale_priceAdvertvariants.nodes.lowestPrice
included.attributes.priceAdvertvariants.nodes.lowestOriginalPrice
included.attributes.barcodeAdvertvariants.nodes.barcode
included.attributes.eanAdvertDeprecated: Use barcode
included.attributes.upcAdvertDeprecated: Use barcode
included.attributes.advert_idAdvertvariants.nodes.advert.legacyId
included.attributes.infiniteAdvertvariants.nodes.infiniteQuantity
included.attributes.tax_codeAdvertvariants.nodes.taxCode
included.attributes.item_tax_rateAdvertvariants.nodes.itemTaxRate
included.attributes.item_tax_rate_percentageAdvertN/a
included.attributes.administrative_body_warningAdvertvariants.nodes.administrativeBodyWarning
included.attributes.intended_purposeAdvertvariants.nodes.intendedPurpose
included.attributes.ingredientsAdvertvariants.nodes.ingredients
included.attributes.directionsAdvertvariants.nodes.directions
included.attributes.storage_instructionsAdvertvariants.nodes.storageInstructions
included.attributes.suitable_forAdvertvariants.nodes.suitableFor
included.attributes.product_warningsAdvertvariants.nodes.productWarnings
included.attributes.health_warningsAdvertvariants.nodes.healthWarnings
included.attributes.allergen_containsAdvertvariants.nodes.allergenContains
included.attributes.allergen_may_containAdvertvariants.nodes.allergenMayContain
included.attributes.nutritional_informationAdvertvariants.nodes.nutritionInformation
included.attributes.min_purchase_quantityAdvertvariants.nodes.maxPurchaseQuantity
included.attributes.max_purchase_quantityAdvertvariants.nodes.minPurchaseQuantity
included.attributes.item_sizeAdvertvariants.nodes.itemSize
included.attributes.comparable_sizeAdvertvariants.nodes.comparableSize
included.attributes.nameAdvertvariants.nodes.label
included.attributes.widthAdvertDeprecated: use shippingParcel.width
included.attributes.lengthAdvertDeprecated: use shippingParcel.length
included.attributes.depthAdvertDeprecated: use shippingParcel.depth
included.attributes.weightAdvertDeprecated: use shippingParcel.width.weight
included.attributes.masterAdvertN/a
included.attributes.item_unitAdvertvariants.nodes.itemUnit
included.attributes.comparable_unitAdvertvariants.nodes.comparableUnit


Brands

List Brands

GET /api/v2/brands

REST FieldGraphQL ObjectGraphQL Field
data.typeBrand__typename
data.idBrandN/a
data.attributes.nameBrandname
data.attributes.slugBrandslug


Images

Show a single image

GET /api/v2/client/adverts/1/images/1

REST FieldGraphQL ObjectGraphQL Field
data.typeImage__typename
data.idImageN/a
data.attributes.pathImageN/a
data.attributes.filenameImagefilename
data.attributes.urlImageurl


Documents

List documents

`GET /api/v2/client/adverts/1/documents/``

REST FieldGraphQL ObjectGraphQL Field
data.typeAdvertDocument__typename
data.idAdvertDocumentN/a
data.attributes.pathAdvertDocumentN/a
data.attributes.filenameAdvertDocumentfilename
data.attributes.urlAdvertDocumenturl


Inventory (multi-store)

Listing a variants inventory

GET /api/v2/client/variants/1/inventories

REST FieldGraphQL ObjectGraphQL Field
data.typeInventory__typename
data.idInventoryN/a
data.attributes.count_on_handInventorycountOnHand
data.attributes.priceInventoryprice
data.attributes.sale_priceInventorysalePrice
data.attributes.infiniteInventoryinfiniteQuantity
data.attributes.seller_idInventoryseller.legacyId
data.attributes.fulfilment_providerInventoryN/a


Invoices

Listing invoices

GET /api/v2/client/invoices

REST FieldGraphQL ObjectGraphQL Field
data.idInvoicelegacyId
data.typeInvoice__typename
data.attributes.postageInvoiceshippingCostCents
data.attributes.postage_before_discountInvoiceN/a
data.attributes.paid_atInvoicepaidAt
data.attributes.statusInvoiceDeprecated: use statusFlags
data.attributes.delivery_typeInvoiceN/a
data.attributes.ready_atInvoiceN/a
data.attributes.collected_atInvoiceN/a
data.attributes.subtotalInvoicesubTotalCents
data.attributes.discountInvoicediscountCents
data.attributes.totalInvoicetotalCents
data.attributes.tax_on_postageInvoicetaxShippingCents
data.attributes.tax_totalInvoicetaxTotalCents
data.attributes.created_atInvoicecreatedAt
data.attributes.external_idInvoiceN/a
data.attributes.tax_inclusiveInvoiceN/a
data.attributes.message_to_sellerInvoicebuyerMessageToSeller
data.attributes.seller_idInvoiceseller.legacyId
data.attributes.postage_trackingInvoiceshipments.trackingNumber
data.attributes.postage_carrierInvoiceshipments.carrier
data.attributes.external_idsInvoiceexternalIds.key
externalIds.value
data.attributes.metadataInvoicemetadata.key
metadata.value


Show a single invoice

GET /api/v2/client/invoices/1?include=line_items,customer

REST FieldGraphQL ObjectGraphQL Field
data.idInvoicelegacyId
data.typeInvoice__typename
data.attributes.postageInvoiceshippingCostCents
data.attributes.postage_before_discountInvoiceN/a
data.attributes.paid_atInvoicepaidAt
data.attributes.statusInvoiceDeprecated: use statusFlags
data.attributes.delivery_typeInvoiceN/a
data.attributes.ready_atInvoiceN/a
data.attributes.collected_atInvoiceN/a
data.attributes.subtotalInvoicesubTotalCents
data.attributes.discountInvoicediscountCents
data.attributes.totalInvoicetotalCents
data.attributes.tax_on_postageInvoicetaxShippingCents
data.attributes.tax_totalInvoicetaxTotalCents
data.attributes.created_atInvoicecreatedAt
data.attributes.external_idInvoiceN/a
data.attributes.tax_inclusiveInvoiceN/a
data.attributes.message_to_sellerInvoicebuyerMessageToSeller
data.attributes.seller_idInvoiceseller.legacyId
data.attributes.postage_trackingInvoiceshipments.trackingNumber
data.attributes.postage_carrierInvoiceshipments.carrier
data.attributes.external_idsInvoiceexternalIds.key
externalIds.value
data.attributes.metadataInvoicemetadata.key
metadata.value
data.relationships.line_items.typeInvoice__typename
data.relationships.line_items.idInvoicelineItems.legacyId
data.relationships.shipments.typeInvoice__typename
data.relationships.shipments.idInvoiceshipments.legacyId
data.relationships.customer.typeInvoiceN/a
data.relationships.customer.idInvoiceN/a
data.relationships.billing_customer.typeInvoiceN/a
data.relationships.billing_customer.idInvoiceN/a
data.relationships.order.typeInvoiceN/a
data.relationships.order.idInvoiceN/a
Included Line Items
included.idInvoicelegacyId
included.attributes.priceInvoicelineItems.itemAmountCents
included.attributes.statusInvoicelineItems.status
included.attributes.subtotalInvoicelineItems.subtotalCents
included.attributes.totalInvoicelineItems.total
included.attributes.quantityInvoicelineItems.quantity
included.attributes.taxon_nameInvoiceN/a
included.attributes.brand_nameInvoiceN/a
included.attributes.invoice_idInvoicelegacyId
included.attributes.advert_nameInvoicelineItems.advertTitle
included.attributes.advert_codeInvoicelineItems.advertCode
included.attributes.advert_external_idInvoiceN/a
included.attributes.variant_nameInvoicelineItems.variantName
included.attributes.variant_skuInvoicelineItems.variantSku
included.attributes.variant_barcodeInvoicelineItems.variantBarcode
included.attributes.variant_external_idInvoiceN/a
included.attributes.tax_totalInvoicelineItems.taxTotalCents
included.attributes.original_tax_rateInvoicelineItems.taxRate
included.attributes.external_idsInvoicelineItems.externalIds.key
lineItems.externalIds.value
included.attributes.metadataInvoicelineItems.metadata.key
lineItems.metadata.value
included.attributes.exposed_metadataInvoiceN/a
Included Shipments
included.idInvoiceshipments.legacyId
included.attributes.shipment_tracking_numberInvoiceshipments.trackingNumber
included.attributes.shipment_carrierInvoiceshipments.carrier
included.attributes.shipment_tracking_linkInvoiceshipments.trackingLink
included.attributes.noteInvoiceshipments.note
included.attributes.dispatched_atInvoiceshipments.dispatchedAt
Included Customer
included.idInvoiceN/a
included.attributes.first_nameInvoicebuyerFirstName
included.attributes.surnameInvoicebuyerSurname
included.attributes.company_nameInvoiceN/a
included.attributes.email_addressInvoicebuyerEmailAddress
included.attributes.phoneInvoicebuyerPhone
included.attributes.addressInvoiceshippingAddress.address
included.attributes.cityInvoiceshippingAddress.city
included.attributes.stateInvoiceshippingAddress.state.short
included.attributes.postcodeInvoiceshippingAddress.postcode
included.attributes.countryInvoiceshippingAddress.country.name
Included Billing_Customer
included.idInvoiceN/a
included.attributes.first_nameInvoiceN/a
included.attributes.surnameInvoiceN/a
included.attributes.company_nameInvoiceN/a
included.attributes.email_addressInvoiceN/a
included.attributes.phoneInvoiceN/a
included.attributes.addressInvoicebuyerBillingAddress.address
included.attributes.cityInvoicebuyerBillingAddress.city
included.attributes.stateInvoicebuyerBillingAddress.state.short
included.attributes.postcodeInvoicebuyerBillingAddress.postcode
included.attributes.countryInvoicebuyerBillingAddress.country.name
Included Orders
included.idInvoiceN/a
included.attributes.external_idsInvoiceN/a


Shipments

Show a single shipment

GET /api/v2/client/invoices/1/shipments/1

REST FieldGraphQL ObjectGraphQL Field
data.typeShipment__typename
data.idShipmentlegacyId
data.attributes.shipment_tracking_numberShipmenttrackingNumber
data.attributes.shipment_carrierShipmentcarrier
data.attributes.shipment_tracking_linkShipmenttrackingLink
data.attributes.noteShipmentnote
data.attributes.dispatched_atShipmentdispatchedAt
data.relationships.line_items.typeShipment__typename
data.relationships.line_items.idShipmentinvoice.lineItems.legacyId
data.relationships.shipped_items.typeShipment__typename
data.relationships.shipped_items.idShipmentN/a
data.relationships.invoice.typeShipment__typename
data.relationships.invoice.idShipmentinvoice.legacyId
Included Line_Items
included.idShipmentlegacyId
included.attributes.priceShipmentinvoice.lineItems.itemAmountCents
included.attributes.statusShipmentinvoice.lineItems.status
included.attributes.subtotalShipmentinvoice.lineItems.subtotalCents
included.attributes.totalShipmentinvoice.lineItems.total
included.attributes.quantityShipmentinvoice.lineItems.quantity
included.attributes.taxon_nameShipmentN/a
included.attributes.brand_nameShipmentN/a
included.attributes.invoice_idShipmentinvoice.legacyId
included.attributes.advert_nameShipmentinvoice.lineItems.advertTitle
included.attributes.advert_codeShipmentinvoice.lineItems.advertCode
included.attributes.advert_external_idShipmentN/a
included.attributes.variant_nameShipmentinvoice.lineItems.variantName
included.attributes.variant_skuShipmentinvoice.lineItems.variantSku
included.attributes.variant_barcodeShipmentinvoice.lineItems.variantBarcode
included.attributes.variant_external_idShipmentN/a
included.attributes.tax_totalShipmentinvoice.lineItems.taxTotalCents
included.attributes.original_tax_rateShipmentinvoice.lineItems.taxRate
included.attributes.external_idsShipmentinvoice.lineItems.externalIds.key
invoice.lineItems.externalIds.value
included.attributes.metadataShipmentinvoice.lineItems.metadata.key
invoice.lineItems.metadata.value
included.attributes.exposed_metadataShipmentN/a
Included Shipped_Items
included.idShipmentN/a
included.attributes.quantityShipmentshippedItems.quantity
included.attributes.line_item_idShipmentshippedItems.lineItem.legacyId


Shipping Profiles

Listing shipping profiles

GET /api/v2/shipping_profiles

REST FieldGraphQL ObjectGraphQL Field
shipping_profile.idShippingProfilelegacyId
shipping_profile.nameShippingProfilename
shipping_profile.descriptionShippingProfiledescription
shipping_profile.created_atShippingProfileN/a
shipping_profile.updated_atShippingProfileN/a


Taxons

Listing Taxons

GET /api/v2/taxons

REST FieldGraphQL ObjectGraphQL Field
data.typeTaxon__typename
data.idTaxonlegacyId
data.attributes.nameTaxondisplayName
data.attributes.tree_nameTaxontreeName
data.attributes.slugTaxonurlSlug
data.attributes.taxon_typeTaxontaxonType


Variants

Listing Variants

GET /api/v2/client/variants

REST FieldGraphQL ObjectGraphQL Field
data.typeVariant__typename
data.idVariantlegacyId
attributes.skuVariantsku
attributes.count_on_handVariantcountOnHand
attributes.notesVariantnotes
attributes.external_idVariantexternalId
attributes.sale_priceVariantlowestPrice
attributes.priceVariantlowestOriginalPrice
attributes.barcodeVariantbarcode
attributes.eanVariantDeprecated: Use barcode
attributes.upcVariantDeprecated: Use barcode
attributes.advert_idVariantadvert.legacyId
attributes.infiniteVariantinfiniteQuantity
attributes.tax_codeVarianttaxCode
attributes.item_tax_rateVariantitemTaxRate
attributes.item_tax_rate_percentageVariantN/a
attributes.administrative_body_warningVariantadministrativeBodyWarning
attributes.intended_purposeVariantintendedPurpose
attributes.ingredientsVariantingredients
attributes.directionsVariantdirections
attributes.storage_instructionsVariantstorageInstructions
attributes.suitable_forVariantsuitableFor
attributes.product_warningsVariantproductWarnings
attributes.health_warningsVarianthealthWarnings
attributes.allergen_containsVariantallergenContains
attributes.allergen_may_containVariantallergenMayContain
attributes.nutritional_informationVariantnutritionInformation
attributes.min_purchase_quantityVariantmaxPurchaseQuantity
attributes.max_purchase_quantityVariantminPurchaseQuantity
attributes.item_sizeVariantitemSize
attributes.comparable_sizeVariantcomparableSize
attributes.sale_price_start_atVariantsalePriceStartAt
attributes.sale_price_end_atVariantsalePriceEndAt
attributes.nameVariantlabel
attributes.widthVariantDeprecated: use shippingParcel.width
attributes.lengthVariantDeprecated: use shippingParcel.length
attributes.depthVariantDeprecated: use shippingParcel.depth
attributes.weightVariantDeprecated: use shippingParcel.width.weight
attributes.masterVariantN/a
attributes.item_unitVariantitemUnit
attributes.comparable_unitVariantcomparableUnit

Show a single variant

GET /api/v2/client/variants/1

REST FieldGraphQL ObjectGraphQL Field
data.typeVariant__typename
data.idVariantlegacyId
attributes.skuVariantsku
attributes.count_on_handVariantcountOnHand
attributes.notesVariantnotes
attributes.external_idVariantexternalId
attributes.sale_priceVariantlowestPrice
attributes.priceVariantlowestOriginalPrice
attributes.barcodeVariantbarcode
attributes.eanVariantDeprecated: Use barcode
attributes.upcVariantDeprecated: Use barcode
attributes.advert_idVariantadvert.legacyId
attributes.infiniteVariantinfiniteQuantity
attributes.tax_codeVarianttaxCode
attributes.item_tax_rateVariantitemTaxRate
attributes.item_tax_rate_percentageVariantN/a
attributes.administrative_body_warningVariantadministrativeBodyWarning
attributes.intended_purposeVariantintendedPurpose
attributes.ingredientsVariantingredients
attributes.directionsVariantdirections
attributes.storage_instructionsVariantstorageInstructions
attributes.suitable_forVariantsuitableFor
attributes.product_warningsVariantproductWarnings
attributes.health_warningsVarianthealthWarnings
attributes.allergen_containsVariantallergenContains
attributes.allergen_may_containVariantallergenMayContain
attributes.nutritional_informationVariantnutritionInformation
attributes.min_purchase_quantityVariantmaxPurchaseQuantity
attributes.max_purchase_quantityVariantminPurchaseQuantity
attributes.item_sizeVariantitemSize
attributes.comparable_sizeVariantcomparableSize
attributes.sale_price_start_atVariantsalePriceStartAt
attributes.sale_price_end_atVariantsalePriceEndAt
attributes.nameVariantlabel
attributes.widthVariantDeprecated: use shippingParcel.width
attributes.lengthVariantDeprecated: use shippingParcel.length
attributes.depthVariantDeprecated: use shippingParcel.depth
attributes.weightVariantDeprecated: use shippingParcel.width.weight
attributes.masterVariantN/a
attributes.item_unitVariantitemUnit
attributes.comparable_unitVariantcomparableUnit
Included Variant_Option_Values
included.typeVariant__typename
included.idVariantvariantOptionValues.nodes.optionValue.legacyId
included.attributes.text_valueVariantvariantOptionValues.nodes.textValue
included.attributes.nameVariantvariantOptionValues.nodes.optionValue.name
included.attributes.presentationVariantvariantOptionValues.nodes.optionValue.presentation
included.relationships.option_type.data.typeVariant__typename
included.relationships.option_type.data.idVariantvariantOptionValues.nodes.optionType.legacyId