Skip to content
Docs

03API reference

Version 1.0.0Made from openapi.yaml

FFL Checkout

Server-to-server only. Find an FFL near a shopper and send Rollmark the order that was made with it.

FFLs near a ZIP

GET/checkout/ffls
FFL Checkout key (rm_chk_), from a server

Server-to-server only (no CORS; a request with an Origin or Sec-Fetch-Site header is refused). Takes a checkout key. The store's plan must include FFL Checkout. Preferred FFLs first, then by distance; the store's blocked FFLs are left out. This is ATF's monthly list, not a live ATF check.

Parameters

NameInTypeDescription
ziprequiredquerystring

Pattern `^[0-9]{5}$`.

radiusqueryinteger

Miles. Default 25

Default 25. 1 to 100.

limitqueryinteger

Default 25. 1 to 50.

pagequeryinteger

Default 1. At least 1.

Responses

Headers: X-Request-Id, X-RateLimit-Remaining

FieldTypeDescription
datarequiredobject[]
data[].idrequiredstring

The 13-character licensee id.

data[].license_numberrequiredstring
data[].namerequiredstring
data[].addressrequiredobject
data[].address.streetrequiredstring | null

Null where the directory hides the street.

data[].address.cityrequiredstring
data[].address.staterequiredstring
data[].address.ziprequiredstring
data[].phonestring | null
data[].license_typerequiredobject
data[].license_type.coderequiredstring
data[].license_type.labelrequiredstring
data[].expiresrequiredstring (date) | null
data[].distance_milesnumber | null
data[].claimedboolean
data[].preferredrequiredboolean
data[].accepts_transfersrequired"yes" | "no" | "unknown"
data[].transfer_feenumber | null
data[].hoursstring | null
data[].contactsobject[]
data[].contacts[].kindrequired"email" | "phone"
data[].contacts[].valuerequiredstring
data[].contacts[].labelstring
pagerequiredinteger
limitrequiredinteger
totalrequiredinteger
list_as_ofrequiredstring (date) | null
Errors400401403404429503in the error envelope.

Example

Shell
curl "https://app.getrollmark.com/api/v1/checkout/ffls" \
  -H "Authorization: Bearer $ROLLMARK_KEY"

One FFL

GET/checkout/ffls/{id}
FFL Checkout key (rm_chk_), from a server

id is the licensee id or a license number written any way. One 404 for every reason (not listed, hidden, a collector, unknown).

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

Headers: X-Request-Id

FieldTypeDescription
datarequiredobject
data.idrequiredstring

The 13-character licensee id.

data.license_numberrequiredstring
data.namerequiredstring
data.addressrequiredobject
data.address.streetrequiredstring | null

Null where the directory hides the street.

data.address.cityrequiredstring
data.address.staterequiredstring
data.address.ziprequiredstring
data.phonestring | null
data.license_typerequiredobject
data.license_type.coderequiredstring
data.license_type.labelrequiredstring
data.expiresrequiredstring (date) | null
data.distance_milesnumber | null
data.claimedboolean
data.preferredrequiredboolean
data.accepts_transfersrequired"yes" | "no" | "unknown"
data.transfer_feenumber | null
data.hoursstring | null
data.contactsobject[]
data.contacts[].kindrequired"email" | "phone"
data.contacts[].valuerequiredstring
data.contacts[].labelstring
data.statusrequired"active" | "expired" | "inactive"
data.blockedrequiredboolean
data.list_as_ofrequiredstring (date) | null
data.ez_check_urlrequiredstring (uri)
data.noticerequiredstring
Errors400401403404429503in the error envelope.

Example

Shell
curl "https://app.getrollmark.com/api/v1/checkout/ffls/<id>" \
  -H "Authorization: Bearer $ROLLMARK_KEY"

The dealer's preferred FFLs

GET/checkout/preferred
FFL Checkout key (rm_chk_), from a server

Parameters

NameInTypeDescription
limitqueryinteger

Default 50. 1 to 50.

pagequeryinteger

Default 1. At least 1.

Responses

Headers: X-Request-Id

FieldTypeDescription
datarequiredobject[]
data[].idrequiredstring

The 13-character licensee id.

data[].license_numberrequiredstring
data[].namerequiredstring
data[].addressrequiredobject
data[].address.streetrequiredstring | null

Null where the directory hides the street.

data[].address.cityrequiredstring
data[].address.staterequiredstring
data[].address.ziprequiredstring
data[].phonestring | null
data[].license_typerequiredobject
data[].license_type.coderequiredstring
data[].license_type.labelrequiredstring
data[].expiresrequiredstring (date) | null
data[].distance_milesnumber | null
data[].claimedboolean
data[].preferredrequiredboolean
data[].accepts_transfersrequired"yes" | "no" | "unknown"
data[].transfer_feenumber | null
data[].hoursstring | null
data[].contactsobject[]
data[].contacts[].kindrequired"email" | "phone"
data[].contacts[].valuerequiredstring
data[].contacts[].labelstring
pagerequiredinteger
limitrequiredinteger
totalrequiredinteger
list_as_ofrequiredstring (date) | null
Errors400401403429503in the error envelope.

Example

Shell
curl "https://app.getrollmark.com/api/v1/checkout/preferred" \
  -H "Authorization: Bearer $ROLLMARK_KEY"

Send the order a shopper made with a chosen FFL

POST/checkout/orders
FFL Checkout key (rm_chk_), from a server

Creates a pending order (or an open, matched one when store_order_number is sent). Idempotent on intake_ref: the same body again is 200 with Idempotent-Replay: true; a different body is 409 intake_conflict. At most 256 KB. No card data, ever: a field named like card data is 400 card_data_rejected.

Request body

FieldTypeDescription
intake_refrequiredstring

Your key for the order (a cart id). Makes the call idempotent.

Up to 100 characters.

store_cart_refstring

Up to 60 characters.

store_order_numberstring | null

When given

Up to 40 characters.

store_order_refstring | null

Up to 60 characters.

dealer_postring | null

Up to 25 characters.

shopperrequiredobject
shopper.namerequiredstring
shopper.emailrequiredstring (email)
shopper.phonestring
billingrequiredobject
billing.namestring
billing.line1requiredstring
billing.line2string
billing.cityrequiredstring
billing.staterequiredstring
billing.ziprequiredstring
billing.countryrequiredstring
shippingobject
shipping.namestring
shipping.line1requiredstring
shipping.line2string
shipping.cityrequiredstring
shipping.staterequiredstring
shipping.ziprequiredstring
shipping.countryrequiredstring
fflobject

Required when any line ships to the FFL. id or license_number, any formatting.

ffl.idstring
ffl.license_numberstring
linesrequiredobject[]

1 to 200 items.

lines[].skustring
lines[].upcstring

Pattern `^[0-9]{8,14}$`.

lines[].mpnstring
lines[].manufacturerstring
lines[].titlerequiredstring
lines[].quantityrequiredinteger

1 to 10000.

lines[].unit_price_centsinteger

At least 0.

lines[].needs_fflboolean

A hint. The library decides; a disagreement is flagged store_disagrees.

totalsobject
totals.currencystring

3 to 3 characters.

totals.subtotal_centsinteger
totals.shipping_centsinteger
totals.tax_centsinteger
totals.total_centsinteger

Responses

Headers: Idempotent-Replay

FieldTypeDescription
datarequiredobject

Where an order stands. Never the shopper's details or billing.

data.idrequiredstring (uuid)
data.intake_refrequiredstring
data.statusrequired"pending" | "open" | "cancelled" | "closed"
data.match_staterequired"unmatched" | "auto" | "manual"
data.dealer_postring | null
data.store_order_numberstring | null
data.cancelled_reasonstring | null
data.fflobject | null

The FFL as it was when the shopper chose it.

data.ffl.idstring
data.ffl.license_numberstring
data.ffl.namestring
data.ffl.phonestring | null
data.ffl.streetstring | null
data.ffl.citystring
data.ffl.statestring
data.ffl.zipstring
data.ffl.list_as_ofstring | null
data.linesrequiredobject[]
data.lines[].line_norequiredinteger
data.lines[].skustring | null
data.lines[].titlerequiredstring
data.lines[].quantityrequiredinteger
data.lines[].ships_torequired"ffl" | "customer"
data.lines[].ship_reasonrequired"firearm" | "receiver" | "library_not_firearm" | "store_hint" | "staff_override"
data.lines[].flaggedstring | null

store_disagrees or unknown_product when staff should look.

data.lines[].product_keystring | null
data.received_atrequiredstring (date-time)
data.updated_atrequiredstring (date-time)
Errors400401403409413422429503in the error envelope.

Example

Shell
curl -X POST "https://app.getrollmark.com/api/v1/checkout/orders" \
  -H "Authorization: Bearer $ROLLMARK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"intake_ref":"…","shopper":{"name":"…","email":"[email protected]"},"billing":{"line1":"…","city":"…","state":"…","zip":"…","country":"…"},"lines":[{"title":"…","quantity":1}]}'

Where an order stands

GET/checkout/orders/{id}
FFL Checkout key (rm_chk_), from a server

id is the order id or ref:<intake_ref>. Never returns the shopper's details.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

FieldTypeDescription
datarequiredobject

Where an order stands. Never the shopper's details or billing.

data.idrequiredstring (uuid)
data.intake_refrequiredstring
data.statusrequired"pending" | "open" | "cancelled" | "closed"
data.match_staterequired"unmatched" | "auto" | "manual"
data.dealer_postring | null
data.store_order_numberstring | null
data.cancelled_reasonstring | null
data.fflobject | null

The FFL as it was when the shopper chose it.

data.ffl.idstring
data.ffl.license_numberstring
data.ffl.namestring
data.ffl.phonestring | null
data.ffl.streetstring | null
data.ffl.citystring
data.ffl.statestring
data.ffl.zipstring
data.ffl.list_as_ofstring | null
data.linesrequiredobject[]
data.lines[].line_norequiredinteger
data.lines[].skustring | null
data.lines[].titlerequiredstring
data.lines[].quantityrequiredinteger
data.lines[].ships_torequired"ffl" | "customer"
data.lines[].ship_reasonrequired"firearm" | "receiver" | "library_not_firearm" | "store_hint" | "staff_override"
data.lines[].flaggedstring | null

store_disagrees or unknown_product when staff should look.

data.lines[].product_keystring | null
data.received_atrequiredstring (date-time)
data.updated_atrequiredstring (date-time)
Errors401403404429503in the error envelope.

Example

Shell
curl "https://app.getrollmark.com/api/v1/checkout/orders/<id>" \
  -H "Authorization: Bearer $ROLLMARK_KEY"

The store's own order now exists

POST/checkout/orders/{id}/match
FFL Checkout key (rm_chk_), from a server

Makes a pending order open. The same number again is 200; another number is 409 already_matched; an order staff cancelled is 409 order_cancelled.

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

FieldTypeDescription
store_order_numberrequiredstring

Up to 40 characters.

store_order_refstring

Up to 60 characters.

Responses

FieldTypeDescription
datarequiredobject

Where an order stands. Never the shopper's details or billing.

data.idrequiredstring (uuid)
data.intake_refrequiredstring
data.statusrequired"pending" | "open" | "cancelled" | "closed"
data.match_staterequired"unmatched" | "auto" | "manual"
data.dealer_postring | null
data.store_order_numberstring | null
data.cancelled_reasonstring | null
data.fflobject | null

The FFL as it was when the shopper chose it.

data.ffl.idstring
data.ffl.license_numberstring
data.ffl.namestring
data.ffl.phonestring | null
data.ffl.streetstring | null
data.ffl.citystring
data.ffl.statestring
data.ffl.zipstring
data.ffl.list_as_ofstring | null
data.linesrequiredobject[]
data.lines[].line_norequiredinteger
data.lines[].skustring | null
data.lines[].titlerequiredstring
data.lines[].quantityrequiredinteger
data.lines[].ships_torequired"ffl" | "customer"
data.lines[].ship_reasonrequired"firearm" | "receiver" | "library_not_firearm" | "store_hint" | "staff_override"
data.lines[].flaggedstring | null

store_disagrees or unknown_product when staff should look.

data.lines[].product_keystring | null
data.received_atrequiredstring (date-time)
data.updated_atrequiredstring (date-time)
Errors400401403404409429503in the error envelope.

Example

Shell
curl -X POST "https://app.getrollmark.com/api/v1/checkout/orders/<id>/match" \
  -H "Authorization: Bearer $ROLLMARK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store_order_number":"…"}'
Rollmark is made by Illumina Studios LLC. It was built at Ironcrest Arms LLC. Sample dealers, license numbers and costs in these docs are made up. Questions: [email protected].