Brikl Logo

BETA

/
Gear Icon
Admin API

About the Admin API

The Admin API lets you integrate your Brikl store with applications that are important to your business, such as CRM, ERP, and back-office applications.

Use Brikl's GraphQL API to build integrations for reporting and bring data from Brikl to your system.

If you're new to GraphQL, visit our Learn GraphQL guides.

Requirements

All GraphQL Admin API queries require a valid personal access token (PAT) and a shop ID.

If you don't have an access token, please get in touch with us to request it.

You can get your shop ID by logging into your dashboard and copying it from the URL. For example:

https://dashboard.brikl.com/dashboard/63d6af47-5d4d-41cb-92f0-2455f4c3dc6f

In the URL above the shop ID is 63d6af47-5d4d-41cb-92f0-2455f4c3dc6f.

Once you have your access token and shop ID, include both in the request header on all API queries:

{ 
	"Authorization": {personal-access-token}, 
	"X-Brikl-Shop-Id": {shop-id} 
}

Endpoint

All Admin API operations are made on a single GraphQL endpoint, which only accepts POST requests:

https://api.brikl.com/graphql/admin/public

You can explore the Brikl Admin API using the GraphQL Playground.

If you need help to set up your GraphQL Playground, please refer to Using the GraphQL Playground.


Queries

GraphQL queries retrieve data from the server. Compared to REST, GraphQL queries operate like GET requests.

Use the queries below to retrieve data about the orders placed in your Brikl store. The data includes payment details, applied discounts, taxes, purchased items, and others.


orderById

Returns an Order resource by ID.


orders

Returns a list of orders placed.


Mutations

GraphQL mutations change data on the server and fetch the changed data in a single operation. GraphQL mutations are analogous to performing HTTP verbs such as POST, PATCH, and DELETE.

Use the mutations below to update data about the orders placed in your Brikl store.


updateOrder

Updates some of the fields of an order.

updateOrder can update the fields comment, shippingStatus, and paymentStatus. The new content for each field overwrites the current one.


updateOrderMetadata

Updates the meta field of an order.


Objects

Objects in GraphQL represent the resources you can access. An object can contain a list of named fields, which are specifically typed.

For example, the Order object has a field called currencyCode typed as String.


Address

Represents a customer address.

For example, a billing address and a mailing address are both represented as an Address object.


AuditLog

Represents a status update of an order.

The AuditLog object holds all details about the status update of an order, such as the type of the update, the new status, and the date and time it happened.


AuditLogVisibility

Represents the visibility of a status update.


BriklOnlySimpleMessageLogData

The data about a Brikl message status update.

Implements

  • LogData

EmailNotificationLogData

The data about an email notification status update.

Implements:

  • LogData

EmailNotificationPayload

The payload for status updates of type EMAIL_NOTIFICATION. See AuditLogPayloadType.


FieldUpdatedLogData

Information about the updated fields.

Implements

  • LogData

FieldUpdatedPayload

The payload for status updates of type FIELD_UPDATED. See AuditLogPayloadType.


Order

Represents a customer's request to purchase one or more products from a shop.

The Order object holds all details about a placed order, such as purchased items, payment, taxes, and others.


OrderConnection

The connection type for Order.


OrderDiscount

Represents the discount applied to an order.


OrderEdge

An object that holds one Order and a cursor for use in pagination.


OrderItem

Represents a purchased item.

The OrderItem object holds details about a purchased item, such as quantity, price, taxes, customization options, and selected variants.


OrderItemCustomizationOption

Represents a customization option for a purchased item.

A customization is an option a customer can select during the buying process. For example, the name one wants to add to a football jersey.


OrderItemVariantOption

Represents the variant option of a purchased item.

A product variant is an option a customer can select during the buying process, such as the size and color of a t-shirt.


OrderMutationOutput

Represents an updated order.


OrderNote

Represents an internal note added by a store admin user.


PageInfo

Returns information about pagination in a connection, in accordance with the Relay specification.


Payment

Represents a customer's payment for an order.

The Payment object holds details about one payment, such as the amount paid, the payment method, and the payment status.


S3KeyPathLogData

Information about the Amazon S3 key.

Implements

  • LogData

Shipment

Represents the shipment of an order.

The Shipment object holds details about an order shipment, such as the package dimensions and weight, the shipment provider and tracking number, the shipment status, and other information.


ShipmentOrderItemSize

Represents the dimensions and weight of an item.


SimpleMessageLogData

The data about a message status update.

Implements

  • LogData

Enums

Enums represent a set of possible values for a field.

For example, the Order object has a field called paymentStatus, which is an enum whose possible values are CANCELED, FAILED, PAID, or PENDING.


AuditLogEventType

The type of event that triggered the status update.

Valid values

ORDER_CREATED

An order has been placed.

ORDER_UPDATED

An order has been updated.

PAYMENT_PAID

A payment has been confirmed.

SHIPMENT_CREATED

A shipment has been created.


AuditLogPayloadType

The possible payload types for a status update. AuditLogPayloadType determines the payload structure for the data field in the AuditLog object.

Valid values

S3_KEYPATH

Amazon S3 path payload type. See S3KeyPathLogData object.

EMAIL_NOTIFICATION

Email notification payload type. See EmailNotificationLogData object.

SIMPLE_MESSAGE

Simple message payload type. See SimpleMessageLogData object.

FIELD_UPDATED

Field updated payload type. See FieldUpdatedLogData object.

BRIKL_SIMPLE_MESSAGE

Brikl message payload type. See BriklOnlySimpleMessageLogData object.


AuditLogStatus

The status of an audit log.

Valid values

ERROR

The audit log represents an error.

WARN

The audit log represents a warning.

SUCCESS

The audit log represents a success.

INFO

The audit log represents additional information.


OrderPaymentStatusEnum

The valid values for the status of a payment.

Valid values

CANCELED

The order payment has been canceled.

FAILED

The order payment operation has failed.

PAID

The order has been paid successfully.

PENDING

The order payment is pending.


PaymentMethod

Represents the payment method used to pay for an order.

Valid values

APPLEPAY

Apple Pay has been used.

BANCONTACT

Bancontact has been used.

BANK_TRANSFER

A bank transfer has been used.

CASH

Cash has been used.

CASH_ON_DELIVERY

Cash on delivery has been used.

CREDIT_CARD

A credit card has been used.

IDEAL

iDEAL has been used.

MANUAL

A manual payment has been used.

PROMPTPAY

PromptPay has been used.

PURCHASE_ORDER

A custom method has been used.

SOFORT

Sofort has been used.


PaymentProvider

Represents the platform used for the payment.

Valid values

CUSTOM

A custom platform has been used.

MANUAL

Manual payment has been used.

OMISE

The Omise platform has been used.

PAYGATE

The PayGate platform has been used.

STRIPE

The Stripe platform has been used.

STRIPE_CONNECT

The Strapi Connect platform has been used.


PaymentStatus

Represents the payment status of an order.

Valid values

FAILED

The payment has failed.

PAID

The order has been paid successfully.

PENDING

The payment is pending.

PROCESSING

The payment is being processed.

REFUNDED

The payment has been refunded.

VOIDED

The payment is displayed as voided.


ProductionStatus

Represents the production status of an item.

Valid values

NOT_APPLICABLE

Status is not applicable for the item.

PENDING

The item production was requested and is awaiting an update on its status.

IN_PRODUCTION

The item is in production.

DONE

The item is done.


ResourceType

Represents the type of a resource.

Valid values

ORDER

The resource is an order.

PAYMENT

The resource is a payment.


ShipmentDimensionsUnitEnum

Units of measurement for dimensions.

Valid values

CM

Centimeters.

IN

Inches.


ShipmentProviderEnum

The platform used for shipping and logistics management.

Valid values

CUSTOM

A custom platform or method has been used.

SENDCLOUD

The Sendcloud shipping platform has been used.

SHIPENGINE

The ShipEngine shipping platform has been used.

BPOST

The bpost shipping platform has been used.


ShipmentWeightUnitEnum

Units of measurement for weight.

Valid values

G

G stands for grams. Gram is the basic metric unit of mass.

KG

KG stands for kilogram — 1 kilogram equals 1000 grams.

LB

LB stands for pound — 1 pound equals 16 ounces.

OZ

OZ stands for ounce. Ounce is the imperial metric unit of mass.


ShippingShippingStatusEnum

The valid values for the status of a shipment.

Valid values

CANCELED

The shipment has been canceled.

DELIVERED

The shipment has been delivered successfully.

ERROR

An error occurred while trying to retrieve the shipping status.

FAILED

The shipment has failed.

IN_TRANSIT

The shipment is in transit.

PENDING

The shipment is pending processing.

UNKNOWN

Unknown status.


ShippingStatusEnum

The valid values for the status of a shipment.

Valid values

CANCELED

The shipment has been canceled.

DELIVERED

The shipment has been delivered successfully.

FAILED

The shipment has failed.

PENDING

The shipment is pending.

SHIPPED

The shipment is on its way.


TaxProvider

The platform responsible for sales tax management.

Valid values

BRIKL_TAX_SETTINGS

Brikl tax settings have been applied.

TAXJAR

TaxJar has been used.


WeightUnit

Units of measurement for weight.

Valid values

G

G stands for grams. Gram is the basic metric unit of mass.

KG

KG stands for kilogram — 1 kilogram equals 1000 grams.

LB

LB stands for pound — 1 pound equals 16 ounces.

OZ

OZ stands for ounce. Ounce is the imperial metric unit of mass.


Input objects

GraphQL operations might accept arguments to configure their behavior. These arguments are often scalars or enums, but they sometimes need to represent more complex values.

To configure fields with complex values, we use input objects. Input objects are objects used as arguments.


OrderFilterInput

Specifies the orders to be retrieved when using the orders query.


OrderTimelineFilterInput

Specifies the type of order updates to be retrieved when querying the history field in the Order object.


UpdateOrderInput

Specifies the information to be updated on an order when using the updatedOrder mutation.


UpdateOrderMetadataInput

Specifies the information to be updated on an order when using the updateOrderMetadata mutation.


Interfaces

Interfaces are parent objects from which other objects can inherit.

For example, LogData is an interface because both S3KeyPathLogData and EmailNotificationLogData hold data logs.

Objects that implement an interface must have all fields defined by that interface.


LogData

Represents the data of the audit log.

Implemented by:

  • S3KeyPathLogData
  • EmailNotificationLogData
  • SimpleMessageLogData
  • FieldUpdatedLogData

Scalars

Scalars are primitive values, like Int, Float, String, Boolean, or ID.

When calling a GraphQL API, you must specify nested subfields until you return only scalars.

For more information, see Scalars in GraphQL spec.


Boolean

Represents true or false values.


DateTime

An ISO-8601 encoded UTC date string.


Float

Represents signed double-precision fractional values as specified by IEEE 754.


ID

Represents a unique identifier. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as M1ugvHj7C==) or integer (such as 7) input value will be accepted as an ID.


Int

Represents a signed 32-bit numeric non-fractional value. Int can represent values between -(2^31) and 2^31 - 1.


JSONObject

The JSONObject scalar type represents JSON objects as specified by ECMA-404.


String

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.