Skip to content

Orders API Reference ​

The Orders API allows you to retrieve, filter, and update orders placed through Shopier storefronts.

Methods ​

  • client.Orders.List(ctx, opts) -> (*PageResponse[Order], error)
  • client.Orders.All(ctx, opts) -> iter.Seq2[Order, error]
  • client.Orders.Get(ctx, id) -> (*Order, error)
  • client.Orders.Update(ctx, id, req) -> (*Order, error)
  • client.Orders.GetTransaction(ctx, orderID) -> (*OrderTransaction, error)

1. List Orders ​

go
opts := &shopier.OrderListOptions{
	ListOptions: shopier.ListOptions{
		Page:  1,
		Limit: 20,
	},
	FulfillmentStatus: "unfulfilled", // "unfulfilled" or "fulfilled"
	RefundType:        "none",        // "none", "partial", "full"
	DateStart:         "2026-01-01T00:00:00Z",
}

res, err := client.Orders.List(ctx, opts)
if err != nil {
	log.Fatal(err)
}

for _, ord := range res.Items {
	fmt.Printf("Order #%s: Total %s %s\n", ord.ID, ord.Totals.Total, ord.Currency)
}

2. Get Order ​

go
order, err := client.Orders.Get(ctx, "123456789")
if err != nil {
	log.Fatal(err)
}

fmt.Printf("Buyer: %s %s (%s)\n", order.ShippingInfo.FirstName, order.ShippingInfo.LastName, order.ShippingInfo.Email)

3. Update Order (Fulfill & Track) ​

go
updated, err := client.Orders.Update(ctx, "123456789", &shopier.OrderUpdateRequest{
	Fulfillments: &shopier.OrderFulfillments{
		ShippingCompany: "yurtici", // yurtici, mng, ptt, aras, surat, ups, dhl, etc.
		TrackingNumber:  "9876543210",
	},
})
if err != nil {
	log.Fatal(err)
}

fmt.Println("New status:", updated.Status) // "fulfilled"

4. Get Order Transaction ​

go
tx, err := client.Orders.GetTransaction(ctx, "123456789")
if err != nil {
	log.Fatal(err)
}

fmt.Printf("Gross: %s %s | Fee: %s %s | Net: %s %s\n",
	tx.Gross.Amount, tx.Gross.Currency,
	tx.Fee.Amount, tx.Fee.Currency,
	tx.Net.Amount, tx.Net.Currency,
)

Data Models & Types ​

Order ​

Represents an order placed on a Shopier storefront.

FieldTypeJSON TagDescription
IDstringidUnique Shopier order identifier (e.g. "123456789")
StatusstringstatusFulfillment status ("unfulfilled", "fulfilled", "cancelled")
PaymentStatusstringpaymentStatusPayment status ("success", "failed", "pending")
Installmentsboolinstallmentstrue if paid via credit card installments
DateCreatedstringdateCreatedISO-8601 creation timestamp
Currencystringcurrency3-letter ISO currency code ("TRY", "USD", "EUR")
PaymentMethodstringpaymentMethodMethod used ("credit_card", etc.)
TotalsOrderTotalstotalsPrice breakdown and order sum
Discounts[]OrderDiscountdiscountsApplied discount vouchers or automatic discounts
ShippingInfoOrderShippingInfoshippingInfoDelivery address and recipient contact details
BillingInfo*OrderBillingInfobillingInfoInvoicing information (corporate or individual)
NotestringnoteOptional customer note left during checkout
LineItems[]OrderLineItemlineItemsPurchased products, selected variants, and quantities

OrderTotals ​

FieldTypeJSON TagDescription
SubtotalstringsubtotalSum of item prices before discounts/shipping (e.g. "200.00")
ShippingstringshippingShipping cost charged to buyer (e.g. "25.00")
DiscountstringdiscountTotal discount amount deducted (e.g. "20.00")
TotalstringtotalFinal payable amount (e.g. "205.00")

OrderShippingInfo ​

FieldTypeJSON TagDescription
FirstNamestringfirstNameRecipient given name
LastNamestringlastNameRecipient surname
NationalIDstringnationalIdTC Identity Number (Turkiye) or passport number
EmailstringemailBuyer email address
PhonestringphoneRecipient phone number (e.g. "05551234567")
CompanystringcompanyOptional company name
AddressstringaddressStreet address line
DistrictstringdistrictDistrict / neighborhood
CitystringcityCity / province
StatestringstateState / province (international)
PostcodestringpostcodePostal / zip code
Countrystringcountry2-letter ISO country code ("TR", "US")

OrderBillingInfo ​

FieldTypeJSON TagDescription
FirstNamestringfirstNameInvoicing given name
LastNamestringlastNameInvoicing surname
TaxOfficestringtaxOfficeCorporate tax administration office
TaxNumberstringtaxNumberCorporate tax identification number
AddressstringaddressOfficial billing street address
CitystringcityBilling city
CountrystringcountryBilling country

OrderLineItem ​

FieldTypeJSON TagDescription
ProductIDstringproductIdShopier product ID
TitlestringtitleProduct title at the time of purchase
Typestringtype"physical" or "digital"
QuantityintquantityNumber of units purchased
PricestringpriceUnit price in store currency
Selection[]OrderLineItemSelectionselectionChosen variant attributes (size, color, etc.)
Options[]OrderLineItemOptionoptionsExtra customized options

OrderUpdateRequest ​

FieldTypeJSON TagDescription
Fulfillments*OrderFulfillmentsfulfillmentsTracking carrier ("yurtici", "mng", "ptt", "aras", "surat", "ups", "dhl") and tracking number
ShippingInfo*OrderShippingInfoshippingInfoUpdated destination delivery address

OrderTransaction ​

FieldTypeJSON TagDescription
OrderIDstringorderIdAssociated order identifier
TypestringtypeTransaction type ("sale", "refund")
DateCreatedstringdateCreatedSettlement creation timestamp
GrossTransactionAmountgrossTotal transaction amount paid by buyer
FeeTransactionFeefeeShopier commission and service deduction
NetTransactionAmountnetNet payable balance deposited to merchant