Rest vs GraphQL

This document covers the key differences between Ordergroove's REST API and GraphQL API for developers familiar with one and moving to the other.

Field Naming

The REST API uses snake_case. The GraphQL API uses camelCase. When mapping fields with both APIs you will need to convert between the naming conventions.

Examples

RESTGraphQL
public_idpublicId
merchant_user_idmerchantUserId
cc_number_endingccNumberEnding
every_periodeveryPeriod
frequency_daysfrequencyDays
cancel_reason_codecancelReasonCode
shipping_totalshippingTotal
order_merchant_idorderMerchantId

DateTime Format

All DateTime fields in the GraphQL API conform to ISO 8601 standards and include an explicit America/Chicago UTC offset. The correct offset is determined per value.

Date-only fields

Some fields represent a calendar date with no meaningful time component. Because GraphQL exposes them as DateTime, they will always carry T00:00:00 in the response:

FieldNotesExample
subscription.startDateBacked by a date-only model field2024-03-15T00:00:00-06:00

For these fields, only the date portion is meaningful — the time can be ignored.