Data models
Every object the Management API returns and every request body it accepts, field by field. Each model links to the endpoints that use it. The same models are in openapi-management.yaml, so you can generate types from them.
Fields marked required are always present in responses and must be sent in requests. nullable fields can be null.
Common#
Problem#
RFC 9457 problem details, served as application/problem+json.
typestring (uri)RequiredLink to the docs for this error.titlestringRequiredstatusintegerRequiredShow valuesHide values
invalid_requestinvalid_parammissing_paraminvalid_api_keytoken_expiredmissing_scopenot_foundmember_not_foundmember_deletedexternal_id_takenphone_in_useidempotency_key_requiredidempotency_key_reusedrequest_in_progressrate_limitedinsufficient_pointsreward_not_foundreward_not_applicablereward_expiredreward_already_usedcode_invalidcode_expiredcode_limit_reachedredemption_expiredredemption_not_reservedone_redemption_per_orderorder_already_existsrefund_exceeds_orderlocation_not_foundchallenge_not_joinableinvalid_stateinternal_errorservice_unavailable
detailstringA sentence about this occurrence.paramstringNullableThe request field at fault, when there is one.order_idstring (uuid)Only onorder_already_exists: the order that was already credited.request_idstringRequiredSame as theRequest-Idheader.
ErrorCode#
Machine-readable error code. May grow.
One of
invalid_request, invalid_param, missing_param, invalid_api_key, token_expired, missing_scope, not_found, member_not_found, member_deleted, external_id_taken, phone_in_use, idempotency_key_required, idempotency_key_reused, request_in_progress, rate_limited, insufficient_points, reward_not_found, reward_not_applicable, reward_expired, reward_already_used, code_invalid, code_expired, code_limit_reached, redemption_expired, redemption_not_reserved, one_redemption_per_order, order_already_exists, refund_exceeds_order, location_not_found, challenge_not_joinable, invalid_state, internal_error, service_unavailableCursorList#
Cursor-paginated list. ?limit= (1 to 100, default 25) and ?cursor=.
dataarray of objectRequiredhas_morebooleanRequiredTrue when another page exists.next_cursorstringRequiredNullablePass ascursorto get the next page.
Program and catalog#
TierRef#
idstring (uuid)RequirednamestringRequired
Rules#
Empty arrays mean no limit.
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringOne ofapp,weblocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
tier_idsarray of string (uuid)
Discount#
typestringRequiredOne ofamount,percent,free_item,bogoamount_centsintegerForamount.percentnumberForpercent.itemsarray of objectItem scope, by Square variation id.Show attributesHide attributes
pos_item_idstringnamestring
categoriesarray of objectCategory scope.Show attributesHide attributes
pos_category_idstringnamestring
max_itemsinteger
AvailableTime#
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
Members and tokens#
Member#
Used by
- POST
/v1/members/{id}/mergeresponse
idstring (uuid)RequiredunPLUG's id for the member. Store it next to your user record.external_idstringNullableYour id for the guest, up to 128 characters.nullfor a guest who has only earned at the register and isn't linked to your login yet.Max Length 128statusstringRequiredactive. Themember.deletedwebhook carriesdeleted; after that, calls about the member return410 member_deleted.One ofactive,deletedfirst_namestringNullablelast_namestringNullableemailstring (email)NullableSaved in lowercase.phonestringNullableE.164, for example+15125550142.phone_verifiedbooleantruewhen you confirmed the guest owns the number, for example with an SMS code. Only verified phones link to existing members.birthdaystring (date)NullableYYYY-MM-DD.points_balanceintegerRequiredPoints the member has now. Never below zero.lifetime_pointsintegerRequiredAll points ever earned, used for tiers. Spending doesn't lower it.idandnameof the current tier.Show attributesTierRef
idstring (uuid)RequirednamestringRequired
next_tierobjectNullableid,nameandpoints_needed(lifetime points still to earn).nullat the top tier.Show attributesHide attributes
idstring (uuid)namestringpoints_neededinteger
communication_preferencesobjectShow attributesHide attributes
email_marketingbooleansms_marketingbooleanpush_marketingboolean
metadataobjectYour own string values. Up to 20 keys, 500 characters each. Don't put personal data here.linked_existingbooleanOnly on create: true when an existing member was linked by verified phone.enrolled_atstring (date-time)When the guest joined the program.created_atstring (date-time)Requiredupdated_atstring (date-time)Required
Activity and wallet#
ActivityEntry#
Used by
idstring (uuid)RequiredtypestringRequiredWhat happened. See the table below. May grow.One ofearn,bonus,redeem,adjust,reverse,expirepointsintegerRequiredSigned change:62for an earn,-500for a redeem.balance_afterintegerRequiredThe member'spoints_balanceright after this entry.descriptionstringA short line you can show the guest, for exampleVisit at South CongressorFree drip coffee.order_idstring (uuid)NullableThe order that caused it, forearn,bonus,redeemandreverse.reward_idstring (uuid)NullableThe reward bought, forredeem.adjustment_reasonstringNullableForadjust:goodwill,correction,migrationorother.One ofgoodwill,correction,migration,othercreated_atstring (date-time)Required
type | Meaning | Sign |
|---|---|---|
earn | Points from an order, in your app or at the register. | + |
bonus | Extra points from a promotion, a birthday or a tier upgrade. | + |
redeem | Points spent on a reward, when the order is credited. | - |
adjust | Points added or removed with a points adjustment. | + or - |
reverse | Points taken back or returned by a refund. | + or - |
expire Coming soon | Points that expired after a period with no activity. | - |
PointsAdjustmentRequest#
Used by
- POST
/v1/members/{id}/points_adjustmentsrequest body
pointsintegerRequiredSigned. Negative values never take the balance below zero.reasonstringRequiredOne ofgoodwill,correction,migration,othernotestringcounts_toward_tierbooleanDefault false
Offers#
Offer Coming soon#
Coming soon.
Used by
- POST
/v1/offersresponse - GET
/v1/offersresponse - GET
/v1/offers/{id}response - PATCH
/v1/offers/{id}response - POST
/v1/offers/{id}/publishresponse - POST
/v1/offers/{id}/pauseresponse - POST
/v1/offers/{id}/resumeresponse - POST
/v1/offers/{id}/endresponse
idstring (uuid)RequiredThe offer.namestringRequiredShown to guests on wallet items and in checkout.descriptionstringOne or two lines for guests.statusstringRequireddraft,scheduled,live,pausedorended.One ofdraft,scheduled,live,paused,endedversionintegerRequiredStarts at 1. Goes up each time a scheduled or live offer is edited. Members keep the version they got.- Same shape as a reward's discount:
typeisamount(amount_cents),percent(percent),free_item(itemsorcategories,max_items) orbogo.Show attributesDiscount
typestringRequiredOne ofamount,percent,free_item,bogoamount_centsintegerForamount.percentnumberForpercent.itemsarray of objectItem scope, by Square variation id.Show attributesHide attributes
pos_item_idstringnamestring
categoriesarray of objectCategory scope.Show attributesHide attributes
pos_category_idstringnamestring
max_itemsinteger
rulesRulesSame shape as a reward's rules:min_subtotal_cents,channels,location_ids,fulfillment,available_times,tier_ids. Empty lists mean no limit.Show attributesRules
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringOne ofapp,weblocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
tier_idsarray of string (uuid)
distributionstringRequiredgranted(lands in the wallet),shared_code(one code for everyone) orunique_codes(single-use codes from batches).One ofgranted,shared_code,unique_codesshared_codestringNullableThe code, forshared_codeoffers. Otherwisenull.per_member_limitintegerNullableHow many times one member can use the offer.nullfor no limit.budgetBudgetmax_redemptionsandmax_discount_cents(either can benull), and the running totalsused_redemptionsandused_discount_cents. Enforced at checkout.Show attributesBudget
max_redemptionsintegerNullablemax_discount_centsintegerNullableused_redemptionsintegerused_discount_centsinteger
starts_atstring (date-time)NullableWhen it goes live.nullto go live on publish.ends_atstring (date-time)NullableWhen it ends.nullfor no end date.wallet_expiry_daysintegerNullableForgrantedoffers: days a wallet item lasts after it's granted.created_bystringapi,dashboardorcampaign.One ofapi,dashboard,campaign
OfferWrite#
Coming soon.
Used by
- POST
/v1/offersrequest body - PATCH
/v1/offers/{id}request body
namestringdescriptionstringdiscountDiscountShow attributesDiscount
typestringRequiredOne ofamount,percent,free_item,bogoamount_centsintegerForamount.percentnumberForpercent.itemsarray of objectItem scope, by Square variation id.Show attributesHide attributes
pos_item_idstringnamestring
categoriesarray of objectCategory scope.Show attributesHide attributes
pos_category_idstringnamestring
max_itemsinteger
rulesRulesShow attributesRules
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringOne ofapp,weblocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
tier_idsarray of string (uuid)
distributionstringOne ofgranted,shared_code,unique_codesshared_codestringper_member_limitintegerbudgetobjectShow attributesHide attributes
max_redemptionsintegermax_discount_centsinteger
starts_atstring (date-time)ends_atstring (date-time)wallet_expiry_daysinteger
OfferPreview#
Used by
- POST
/v1/offers/{id}/previewresponse
eligible_membersintegerexpected_redemptionsintegerexpected_cost_centsintegerwarningsarray of string
Budget#
max_redemptionsintegerNullablemax_discount_centsintegerNullableused_redemptionsintegerused_discount_centsinteger
GrantRequest#
Used by
- POST
/v1/offers/{id}/grantsrequest body
grant_refstringRequiredmember_idsarray of string (uuid)RequiredMax Items 500
GrantResult#
Used by
- POST
/v1/offers/{id}/grantsresponse
grantedintegerskippedarray of SkippedShow attributesSkipped
member_idstring (uuid)reasonstring
Skipped#
member_idstring (uuid)reasonstring
CodeBatchRequest#
Used by
- POST
/v1/offers/{id}/code_batchesrequest body
prefixstringRequiredquantityintegerRequired
CodeBatch#
Used by
idstring (uuid)offer_idstring (uuid)prefixstringquantityintegerstatusstringcreated_atstring (date-time)
Challenges#
Challenge Coming soon#
Coming soon.
Used by
- GET
/v1/challengesresponse - POST
/v1/challengesresponse - PATCH
/v1/challenges/{id}response - POST
/v1/challenges/{id}/publishresponse - POST
/v1/challenges/{id}/pauseresponse - POST
/v1/challenges/{id}/endresponse
idstring (uuid)RequiredThe challenge.namestringRequiredShown to guests.descriptionstringOne or two lines for guests.image_urlstring (uri)NullableHTTPS image for the challenge card.typestringRequiredvisits,streak,spendormenu_discovery.One ofvisits,streak,spend,menu_discoverygoalobjectRequiredtarget(number to reach) andunit(visits,periods,centsoritems). Streaks addperiod(dayorweek) andgrace_periods. Menu discovery addsitem_set: items (pos_item_id,name) or categories (pos_category_id,name). Fields that don't apply arenullor empty.Show attributesHide attributes
targetintegerunitstringOne ofvisits,periods,cents,itemsperiodstringNullableOne ofday,weekgrace_periodsintegerNullableitem_setarray of object
qualifyingobjectWhich orders count:min_subtotal_cents,channels,location_ids,fulfillment,available_times(same shapes as reward rules; empty lists mean no limit) andmax_counted_per_day(default 1).Show attributesHide attributes
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringlocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
max_counted_per_dayinteger
windowobject or objectRequired{ "kind": "fixed", "starts_at", "ends_at" }for the same dates for everyone, or{ "kind": "rolling", "days" }for a window per member that starts when they join.enrollmentstringRequiredautomaticoropt_in.One ofautomatic,opt_inrewardobject or objectRequired{ "kind": "points", "points" }for bonus points, or{ "kind": "reward", "reward_id" }for a catalog reward that lands in the wallet.max_completions_per_memberintegerUsually 1.budgetobjectmax_completionsacross all members, ornullfor no limit.Show attributesHide attributes
max_completionsintegerNullable
statusstringRequireddraft,scheduled,live,pausedorended.One ofdraft,scheduled,live,paused,endedversionintegerGoes up each time a scheduled or live challenge is edited. Members keep the rules of the version they joined.
ChallengeWrite#
Coming soon.
Used by
- POST
/v1/challengesrequest body - PATCH
/v1/challenges/{id}request body
namestringdescriptionstringimage_urlstring (uri)NullabletypestringOne ofvisits,streak,spend,menu_discoverygoalobjectShow attributesHide attributes
targetintegerunitstringOne ofvisits,periods,cents,itemsperiodstringNullableOne ofday,weekgrace_periodsintegerNullableitem_setarray of object
qualifyingobjectShow attributesHide attributes
min_subtotal_centsintegerInteger cents.Min 0channelsarray of stringlocation_idsarray of string (uuid)fulfillmentarray of stringOne ofpickup,delivery,curbside,dine_inavailable_timesarray of AvailableTimeShow attributesAvailableTime
daysarray of stringShow valuesHide values
montuewedthufrisatsun
startstringLocal time, HH:MM.endstringLocal time, HH:MM.
max_counted_per_dayinteger
windowobject or objectenrollmentstringOne ofautomatic,opt_inrewardobject or objectmax_completions_per_memberintegerbudgetobjectShow attributesHide attributes
max_completionsintegerNullable
ChallengePreview#
Used by
- POST
/v1/challenges/{id}/previewresponse
audience_membersintegerexpected_completionsintegerexpected_pointsintegerexpected_cost_centsintegerwarningsarray of string
EnrollmentRequest#
Used by
- POST
/v1/challenges/{id}/enrollmentsrequest body
member_idsarray of string (uuid)RequiredMax Items 500
ChallengeTemplate#
Used by
- GET
/v1/challenge_templatesresponse
idstringnamestringdescriptionstringtypestringgoalobjectqualifyingobjectwindow_kindstringOne offixed,rollingwindow_daysintegerenrollmentstringOne ofautomatic,opt_insuggested_rewardstring
Reports#
ReportFigures#
membersobjectShow attributesHide attributes
totalintegernewintegeractiveinteger
pointsobjectShow attributesHide attributes
issuedintegerredeemedintegeradjustedintegeroutstandinginteger
rewardsobjectShow attributesHide attributes
issuedintegerredeemedintegerdiscount_centsinteger
ordersobjectShow attributesHide attributes
member_ordersintegermember_sales_centsintegernon_member_ordersintegernon_member_sales_centsinteger
ProgramSummaryReport Coming soon#
Coming soon.
Used by
- GET
/v1/reports/program_summaryresponse
fromstring (date)tostring (date)location_idstring (uuid)Nullabletime_zonestringcurrencystringISO 4217 code.USD.totalsReportFiguresShow attributesReportFigures
membersobjectShow attributesHide attributes
totalintegernewintegeractiveinteger
pointsobjectShow attributesHide attributes
issuedintegerredeemedintegeradjustedintegeroutstandinginteger
rewardsobjectShow attributesHide attributes
issuedintegerredeemedintegerdiscount_centsinteger
ordersobjectShow attributesHide attributes
member_ordersintegermember_sales_centsintegernon_member_ordersintegernon_member_sales_centsinteger
daysarray of object + ReportFigures
RewardReportRow#
reward_idstring (uuid)namestringkindstringOne ofpoints,walletpoints_costintegerNullableissuedintegerredeemedintegerpoints_spentintegerdiscount_centsinteger
RewardsReport Coming soon#
Coming soon.
Used by
- GET
/v1/reports/rewardsresponse
fromstring (date)tostring (date)time_zonestringcurrencystringISO 4217 code.USD.dataarray of RewardReportRowShow attributesRewardReportRow
reward_idstring (uuid)namestringkindstringOne ofpoints,walletpoints_costintegerNullableissuedintegerredeemedintegerpoints_spentintegerdiscount_centsinteger