Store management

In BFG, stores represent physical or online retail locations that are linked to a brand. These stores are managed through the BFG platform so brands can:

  • List where their products are available
  • Display store-specific contact and branding details (logo, phone, email, etc.)

Stores are entities tied to the authenticated brand. Each store record includes metadata like:

  • Name, address, and contact info
  • Capabilities (e.g., store_pickup, online_shopping)
  • Brand identity (e.g., logo, friendly_name)
  • Geolocation

List stores

Retrieves a paginated list of stores linked to the authenticated brand. Supports filtering, sorting, and pagination.

Endpoint: GET /api/manufacturers/stores

Query parameters

ParameterRequiredDescription
sortNoSorts by the specified field.
page_sizeNoSets the number of results per page.
pageNoSets the page number.
filter[field]NoFilters stores by matching field values.
filter[trashed]NoFilters based on whether the store is trashed.

Example request

curl --request GET \
  --get "https://api-sandbox.buyingfreedom.app/api/manufacturers/stores?sort=name&page=2&page_size=20&filter%5Bfield%5D=dolor&filter%5Btrashed%5D=with" \
  --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"

Example response

{
  "data": [
    {
      "id": 11,
      "account_id": "73f05e76-9984-4a7d-9f9a-9dbb9c65c96d",
      "name": "Hendrix Armory",
      "friendly_name": "Hendrix Armory HQ",
      "logo_url": "https://example.com/logos/hendrix-armory.png",
      "phone": "4045552983",
      "email": "[email protected]",
      "website": "https://hendrixarmory.com",
      "store_pickup": true,
      "online_shopping": false,
      "allow_backorder": true,
      "low_stock_threshold": 8,
      "address_1": "789 WESTFIELD ROAD",
      "address_2": "BUILDING A",
      "address_3": null,
      "city": "GREENSBORO",
      "state": "NC",
      "postal_code": "27407",
      "country": "US",
      "timezone": "America/New_York",
      "longitude": -79.8194,
      "latitude": 36.0726,
      "is_residential": false,
      "full_address": "789 WESTFIELD ROAD, BUILDING A, GREENSBORO, NC 27407, US",
      "uses_ffl": true,
      "hours": [
        {
          "id": 4,
          "company_id": 11,
          "day_of_week": 1,
          "open_time": "10:00:00",
          "close_time": "18:00:00",
          "is_closed": false,
          "special": false,
          "created_at": "2024-02-01T10:00:00.000000Z",
          "updated_at": "2024-02-01T10:00:00.000000Z"
        }
      ],
      "tags": [
        {
          "id": 7,
          "name": "Veteran-Owned",
          "slug": "veteran-owned",
          "text": "Veteran-Owned",
          "color": "#17a2b8",
          "icon": "medal"
        }
      ],
      "types": [
        {
          "id": 5,
          "name": "Tactical Supply",
          "slug": "tactical-supply",
          "text": "Tactical Supply",
          "color": "#ffc107",
          "icon": "target"
        }
      ],
      "manufacturer_account_number": "MFG98765",
      "brand_terms_signed_at": "2024-03-01T15:45:00.000000Z",
      "show_on_locator": true,
      "show_stock_availability": true,
      "show_website": true,
      "custom_attributes": [
        {
          "id": 3,
          "company_attribute_id": 6,
          "company_attribute": {
            "id": 6,
            "name": "POS ID",
            "input_type": "text"
          },
          "value": "POS45678",
          "is_active": true
        }
      ],
      "is_promoted": true,
      "product_url": "https://example.com/products/hendrix",
      "inventory_url": "https://example.com/inventory/hendrix",
      "brand_signed_terms": true,
      "brand_terms_file": {
        "id": 9,
        "name": "signed-terms-hendrix.pdf",
        "file_name": "signed-terms-hendrix.pdf",
        "mime_type": "application/pdf",
        "size": 204800,
        "url": "https://example.com/media/agreements/signed-terms-hendrix.pdf"
      },
      "created_at": "2024-02-01T00:00:00.000000Z",
      "updated_at": "2024-02-01T00:00:00.000000Z",
      "deleted_at": null
    }
  ],
  "links": {
    "first": "https://api.example.com/api/manufacturers/stores?page=1",
    "last": "https://api.example.com/api/manufacturers/stores?page=5",
    "prev": "https://api.example.com/api/manufacturers/stores?page=1",
    "next": "https://api.example.com/api/manufacturers/stores?page=3"
  },
  "meta": {
    "current_page": 2,
    "from": 21,
    "last_page": 5,
    "path": "https://api.example.com/api/manufacturers/stores",
    "per_page": 20,
    "to": 40,
    "total": 87
  }
}

Create a store

Creates a new store and associates it with the authenticated brand.

Endpoint: POST /api/manufacturers/stores

To link an existing store to a brand, you can optionally get the ffl_license_number by calling the GET /api/ffls endpoint. In the response, use the value in ffl_number as the ffl_license_number in your Create a store request.

If the ffl_license_number exists in the BFG database, the system finds the matching store and associates it with the brand linked to the company token in the request.

If no FFL exists, the system checks for an exact match of address_1, city, state, and postal code. All values must match.

If no exact match is found, the system uses AI to look for possible typos or close matches.

If no existing store is found, the system creates a new store and links it to the brand determined by the token in the request.

Body parameters

ParameterRequiredDescription
ffl_license_numberNoThe store’s FFL license number.
nameYesThe store name. Must be unique within the postal code. Max 255 characters.
friendly_nameNoA friendly display name for the store. Max 255 characters.
logoNoThe company logo. Must be a valid image file. Max size 2 MB.
phoneNoThe store’s phone number. Max 25 characters.
emailNoThe store’s email address. Must be valid. Max 255 characters.
websiteNoThe store’s website URL. Must be valid. Max 255 characters.
store_pickupNoSet to true if the store offers store pickup.
online_shoppingNoSet to true if the store offers online shopping.
low_stock_thresholdNoStock quantity that triggers low stock alerts.
address_1NoThe primary street address. Max 255 characters.
address_2NoOptional secondary address line. Max 255 characters.
address_3NoOptional tertiary address line. Max 255 characters.
cityNoThe city where the store is located. Max 60 characters.
stateNoThe state or province. For US, use valid two-letter code. Max 30 characters.
postal_codeNoPostal or ZIP code. Max 255 characters.
countryNoThe country where the store is located. Max 255 characters.
is_residentialNoSet to true if the store is at a residential address.
uses_fflNoSet to true if the store uses FFL services.
manufacturer_account_numberNoThe manufacturer’s account number. Max 255 characters.
product_urlNoThe product URL. Must be valid. Max 255 characters.
brand_urlNoThe brand URL. Must be valid. Max 255 characters.
brand_signed_termsNoSet to true if brand terms have been signed.
brand_terms_fileNoUpload brand terms file (PDF).
store_tagsNoPipe-separated list of store tags.
store_typesNoPipe-separated list of store types.
show_on_locatorNoSet to true to show the store in the locator.
show_stock_availabilityNoSet to true to display stock availability.
show_websiteNoSet to true to display the store website.
is_promotedNoSet to true if the store is promoted.
custom_attributesNoPipe-separated custom attributes in "Name: Value|Name2: Value2" format.

Example request

curl --request POST \
  "https://api-sandbox.buyingfreedom.app/api/manufacturers/stores" \
  --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  --header "Content-Type: multipart/form-data" \
  --header "Accept: application/json" \
  --form "ffl_license_number=HX9057301M23199" \
  --form "name=HENDRIX ARMORY" \
  --form "friendly_name=Hendrix Armory HQ" \
  --form "phone=9785550147" \
  --form "[email protected]" \
  --form "website=https://hendrixarmory.com" \
  --form "store_pickup=1" \
  --form "online_shopping=1" \
  --form "low_stock_threshold=8" \
  --form "address_1=425 ELM ST UNIT A" \
  --form "address_2=Suite 300" \
  --form "address_3=North Wing" \
  --form "city=STONEBRIDGE" \
  --form "state=TX" \
  --form "postal_code=75214" \
  --form "country=US" \
  --form "is_residential=0" \
  --form "uses_ffl=1" \
  --form "manufacturer_account_number=HX-MFG-91027" \
  --form "product_url=https://hendrixarmory.com/products" \
  --form "brand_url=https://hendrixarmory.com/brands" \
  --form "brand_signed_terms=1" \
  --form "store_tags[]=Veteran Owned" \
  --form "store_types[]=Sporting Goods" \
  --form "show_on_locator=1" \
  --form "show_stock_availability=1" \
  --form "show_website=1" \
  --form "is_promoted=0" \
  --form "custom_attributes[Account Number]=HX-ACCT-9812" \
  --form "custom_attributes[Billing ID]=99881" \
  --form "logo=@/path/to/logo.png" \
  --form "brand_terms_file=@/path/to/brand-terms.pdf"

Example response

{
  "data": {
    "id": 52,
    "account_id": "f17e10c3-a210-4a29-9f33-94f6017e6574",
    "name": "HENDRIX ARMORY",
    "friendly_name": "Hendrix Armory HQ",
    "logo_url": "https://example.com/logos/hendrix-armory.png",
    "phone": "9785550147",
    "email": "[email protected]",
    "website": "https://hendrixarmory.com",
    "store_pickup": true,
    "online_shopping": true,
    "allow_backorder": false,
    "low_stock_threshold": 8,
    "address_1": "425 ELM ST UNIT A",
    "address_2": "Suite 300",
    "address_3": "North Wing",
    "city": "STONEBRIDGE",
    "state": "TX",
    "postal_code": "75214",
    "country": "US",
    "timezone": "America/Chicago",
    "longitude": -96.7697,
    "latitude": 32.8072,
    "is_residential": false,
    "full_address": "425 ELM ST UNIT A, Suite 300, North Wing, STONEBRIDGE, TX 75214, US",
    "uses_ffl": true,
    "hours": [],
    "tags": [
      {
        "id": 5,
        "name": "Veteran Owned",
        "slug": "veteran-owned",
        "text": "Veteran Owned",
        "color": "#28a745",
        "icon": "flag"
      }
    ],
    "types": [
      {
        "id": 3,
        "name": "Sporting Goods",
        "slug": "sporting-goods",
        "text": "Sporting Goods",
        "color": "#fd7e14",
        "icon": "trophy"
      }
    ],
    "manufacturer_account_number": "HX-MFG-91027",
    "brand_terms_signed_at": "2024-05-20T09:45:00.000000Z",
    "show_on_locator": true,
    "show_stock_availability": true,
    "show_website": true,
    "custom_attributes": [
      {
        "id": 1,
        "company_attribute_id": 1,
        "company_attribute": {
          "id": 1,
          "name": "Account Number",
          "input_type": "text"
        },
        "value": "HX-ACCT-9812",
        "is_active": true
      },
      {
        "id": 2,
        "company_attribute_id": 2,
        "company_attribute": {
          "id": 2,
          "name": "Billing ID",
          "input_type": "text"
        },
        "value": "99881",
        "is_active": true
      }
    ],
    "is_promoted": false,
    "product_url": "https://hendrixarmory.com/products",
    "inventory_url": null,
    "brand_signed_terms": true,
    "brand_terms_file": {
      "id": 8,
      "name": "brand-terms.pdf",
      "file_name": "brand-terms.pdf",
      "mime_type": "ap_

Get a store

Retrieves the details of a specific store by its brand ID.

Endpoint: GET /api/manufacturers/stores/{account_id}

URL Parameters

  • account_id: The unique identifier of the store.

Example request

curl --request GET \
  --get "https://api-sandbox.buyingfreedom.app/api/manufacturers/stores/hendrix-armory" \
  --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"

Example response

{
  "data": {
    "id": 301,
    "account_id": "e3721fd6-d3e2-4bc5-9270-52f91213b3c7",
    "name": "HENDRIX ARMORY",
    "friendly_name": "Hendrix Armory Flagship",
    "logo_url": "https://example.com/logos/hendrix-armory.png",
    "phone": "8005553210",
    "email": "[email protected]",
    "website": "https://hendrixarmory.com",
    "store_pickup": true,
    "online_shopping": true,
    "allow_backorder": false,
    "low_stock_threshold": 15,
    "address_1": "725 Mission Trail",
    "address_2": null,
    "address_3": null,
    "city": "Liberty Hill",
    "state": "TX",
    "postal_code": "78642",
    "country": "US",
    "timezone": "America/Chicago",
    "longitude": -97.7925,
    "latitude": 30.6648,
    "is_residential": false,
    "full_address": "725 Mission Trail, Liberty Hill, TX 78642, US",
    "uses_ffl": true,
    "hours": [
      {
        "id": 1,
        "company_id": 301,
        "day_of_week": 1,
        "open_time": "10:00:00",
        "close_time": "18:00:00",
        "is_closed": false,
        "special": false,
        "created_at": "2025-01-01T00:00:00.000000Z",
        "updated_at": "2025-01-01T00:00:00.000000Z"
      }
    ],
    "tags": [
      {
        "id": 1,
        "name": "Premium Store",
        "slug": "premium-store",
        "text": "Premium Store",
        "color": "#007bff",
        "icon": "star"
      }
    ],
    "types": [
      {
        "id": 1,
        "name": "Gun Store",
        "slug": "gun-store",
        "text": "Gun Store",
        "color": "#dc3545",
        "icon": "crosshairs"
      }
    ],
    "manufacturer_account_number": null,
    "brand_terms_signed_at": null,
    "show_on_locator": true,
    "show_stock_availability": true,
    "show_website": true,
    "custom_attributes": [],
    "is_promoted": false,
    "product_url": null,
    "inventory_url": null,
    "brand_signed_terms": false,
    "brand_terms_file": null,
    "created_at": "2025-01-01T00:00:00.000000Z",
    "updated_at": "2025-01-01T00:00:00.000000Z",
    "deleted_at": null
  }
}

Update a store

Updates store information for a specific brand. Some fields are immutable.

Endpoint: PUT /api/manufacturers/stores/{account_id}

Immutable fields

The following fields cannot be updated using this endpoint. If you include them in a request, they are ignored. To change these fields, contact your BFG representative.

  • name
  • friendly_name
  • address_1
  • address_2
  • address_3
  • city
  • state
  • postal_code
  • country
  • phone
  • ffl_license_number
  • email
  • website

URL parameters (mutable fields)

  • account_id: The unique identifier of the store.

Body parameters (mutable fields)

FieldRequiredDescription
logoNoURL to the store’s logo image.
store_pickupNoIndicates whether the store offers store pickup.
online_shoppingNoIndicates whether the store offers online shopping.
auto_accept_orderNoWhether orders are automatically accepted.
low_stock_thresholdNoThe low stock threshold for inventory alerts.
is_residentialNoSet to true if the store is at a residential address.
uses_fflNoSet to true if the store uses FFL services.
manufacturer_account_numberNoThe manufacturer account number.
product_urlNoThe product URL. Must be valid. Maximum length: 255 characters.
brand_urlNoThe brand URL. Must be valid. Maximum length: 255 characters.
brand_signed_termsNoSet to true if brand terms have been signed.
brand_terms_fileNoBrand terms file upload. Must be a PDF file.
store_tagsNoPipe-separated list of store tags.
store_typesNoPipe-separated list of store types.
show_on_locatorNoSet to true to show the store in the locator.
show_stock_availabilityNoSet to true to show stock levels.
show_websiteNoSet to true to display the store website.
is_promotedNoSet to true if the store is promoted.
custom_attributesNoPipe-separated custom attributes in `"Name: Value

Example request

curl --request PUT \
  "https://api-sandbox.buyingfreedom.app/api/manufacturers/stores/746c3a5b-9f92-4c02-8594-d3388f97fd13" \
  --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  --header "Content-Type: multipart/form-data" \
  --header "Accept: application/json" \
  --form "ffl_license_number=982337001A00088" \
  --form "name=HENDRIX ARMORY" \
  --form "friendly_name=Hendrix Armory HQ" \
  --form "phone=8885552468" \
  --form "[email protected]" \
  --form "website=https://hendrixarmory.com" \
  --form "store_pickup=1" \
  --form "online_shopping=0" \
  --form "low_stock_threshold=15" \
  --form "address_1=725 Mission Trail" \
  --form "address_2=Building 2" \
  --form "address_3=Warehouse A" \
  --form "city=Liberty Hill" \
  --form "state=TX" \
  --form "postal_code=78642" \
  --form "country=US" \
  --form "is_residential=1" \
  --form "uses_ffl=1" \
  --form "manufacturer_account_number=MFG54321" \
  --form "product_url=https://hendrixarmory.com/catalog" \
  --form "brand_url=https://hendrixarmory.com/brands" \
  --form "brand_signed_terms=1" \
  --form "store_tags[]=Veteran Owned" \
  --form "store_types[]=Outdoor Store" \
  --form "show_on_locator=0" \
  --form "show_stock_availability=1" \
  --form "show_website=0" \
  --form "is_promoted=1" \
  --form "custom_attributes[Account Number]=DEF67890" \
  --form "custom_attributes[Billing ID]=99001" \
  --form "logo=@/private/tmp/phpXYZ1.png" \
  --form "brand_terms_file=@/private/tmp/phpXYZ2.pdf"

Example response

{
  "data": {
    "id": 301,
    "account_id": "bb12cd34-ef56-7890-ab12-cd34567890ef",
    "name": "HENDRIX ARMORY",
    "friendly_name": "Hendrix Armory HQ",
    "logo_url": "https://example.com/logos/hendrix-armory-updated.png",
    "phone": "8885552468",
    "email": "[email protected]",
    "website": "https://hendrixarmory.com",
    "store_pickup": true,
    "online_shopping": false,
    "allow_backorder": false,
    "low_stock_threshold": 15,
    "address_1": "725 Mission Trail",
    "address_2": "Building 2",
    "address_3": "Warehouse A",
    "city": "Liberty Hill",
    "state": "TX",
    "postal_code": "78642",
    "country": "US",
    "timezone": "America/Chicago",
    "longitude": -97.7925,
    "latitude": 30.6648,
    "is_residential": true,
    "full_address": "725 Mission Trail, Building 2, Warehouse A, Liberty Hill, TX 78642, US",
    "uses_ffl": true,
    "hours": [],
    "tags": [
      {
        "id": 3,
        "name": "Veteran Owned",
        "slug": "veteran-owned",
        "text": "Veteran Owned",
        "color": "#28a745",
        "icon": "flag"
      }
    ],
    "types": [
      {
        "id": 2,
        "name": "Outdoor Store",
        "slug": "outdoor-store",
        "text": "Outdoor Store",
        "color": "#28a745",
        "icon": "tree"
      }
    ],
    "manufacturer_account_number": "MFG54321",
    "brand_terms_signed_at": "2025-01-20T14:45:00.000000Z",
    "show_on_locator": false,
    "show_stock_availability": true,
    "show_website": false,
    "custom_attributes": [
      {
        "id": 1,
        "company_attribute_id": 1,
        "company_attribute": {
          "id": 1,
          "name": "Account Number",
          "input_type": "text"
        },
        "value": "DEF67890",
        "is_active": true
      },
      {
        "id": 2,
        "company_attribute_id": 2,
        "company_attribute": {
          "id": 2,
          "name": "Billing ID",
          "input_type": "text"
        },
        "value": "99001",
        "is_active": true
      }
    ],
    "is_promoted": true,
    "product_url": "https://hendrixarmory.com/catalog",
    "inventory_url": "https://hendrixarmory.com/inventory",
    "brand_signed_terms": true,
    "brand_terms_file": {
      "id": 2,
      "name": "updated-brand-terms.pdf",
      "file_name": "updated-brand-terms.pdf",
      "mime_type": "application/pdf",
      "size": 2048000,
      "url": "https://example.com/media/agreements/updated-brand-terms.pdf"
    },
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2025-08-14T12:00:00.000000Z",
    "deleted_at": null
  },
  "status": "SUCCESS",
  "partial_update": true,
  "updated_fields": [
    "logo",
    "low_stock_threshold",
    "is_residential",
    "manufacturer_account_number",
    "product_url",
    "brand_url",
    "brand_signed_terms",
    "store_tags",
    "store_types",
    "custom_attributes"
  ],
  "ignored_fields": [
    "name",
    "email",
    "phone",
    "website",
    "address_1",
    "city",
    "state",
    "postal_code",
    "country"
  ],
  "message": "Some fields are immutable. Check the ignored_fields for more details.",
  "warnings": []
}