The Aryeo API provides access to the Aryeo platform.

Languages
Servers
Mock server

https://docs.aryeo.com/_mock/api/aryeo/

Production

https://api.aryeo.com/v1/

Addresses

Operations related to addresses.

Operations

Appointments

Operations related to appointments.

Operations

Discounts

Operations related to discounts.

Operations

List coupons.

Request

List coupons.

external: true
Query
filter[search]string(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...

Return coupons that have a name matching this field.

Example: filter[search]=00000000-0000-4000-8000-000000000000
includestring[ 0 .. 255 ] characters

Comma separated list of optional data to include in the response.

Example: include=promotion_codes
sortstring[ 1 .. 100 ] characters

Comma separated list of fields used for sorting. Placing a minus symbol in front of a field name sorts in descending order. Defaults to -created_at.

Example: sort=-created_at
per_pagestring[ 1 .. 5 ] characters

The number of items per page. Defaults to 25.

Example: per_page=25
pagestring[ 1 .. 5 ] characters

The requested page. Defaults to 1.

Example: page=2
const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/coupons`,
  {
    method: 'GET',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

CouponCollection

Bodyapplication/json
statusstring[ 0 .. 255 ] charactersrequired

What was the state of the request?

Example: "success"
dataArray of objects or null(Coupon)

A collection of objects.

metaobject(PaginationMeta)

Metadata about a paginated response.

linksobject(PaginationLinks)

Related links for a paginated response.

timestampstring or null(date-time)= 20 characters

The request timestamp (ISO 8601).

Example: "2021-06-30T20:30:00Z"
Response
application/json
{ "status": "success", "data": [ { "id": "00000000-0000-4000-8000-000000000000", "name": "VIP Customer Discount", "is_active": true, "is_percent_off": true, "percent_off": 0.075, "amount_off": 2500, "amount_off_formatted": "$25.00", "promotion_codes": [ { "id": "00000000-0000-4000-8000-000000000000", "code": "SPRING_SALE", "times_redeemed": 10, "start_at": "2021-06-30T20:30:00Z", "end_at": "2021-06-30T20:30:00Z", "max_redemptions": 10, "max_redemptions_per_customer": 10, "first_time_only": true, "minimum_amount": 1000, "is_portal_mobile_app_only": true } ], "discountables": [ { "object": "DISCOUNTABLE", "id": "00000000-0000-4000-8000-000000000000", "discountable": { … } } ], "times_redeemed": 10, "created_at": "2021-06-30T20:30:00Z" } ], "meta": { "total": 50, "per_page": 15, "current_page": 1, "last_page": 4, "from": 1, "to": 15, "path": "https://api.aryeo.com/v1/{path}", "links": [ { "url": "https://admin.aryeo.test/api/v1/companies?page=2", "label": "2", "active": true } ] }, "links": { "first": "https://api.aryeo.com/v1/{path}?page=1", "last": "https://api.aryeo.com/v1/{path}?page=10", "prev": "https://api.aryeo.com/v1/{path}?page=2", "next": "https://api.aryeo.com/v1/{path}?page=3" }, "timestamp": "2021-06-30T20:30:00Z" }

Create discount.

Request

Create discount.

external: true
Bodyapplication/json

DiscountPostPayload

order_idstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

ID of the order apply this coupon to. UUID Version 4.

Example: "00000000-0000-4000-8000-000000000000"
coupon_idstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...

ID of the coupon to apply. UUID Version 4.

Example: "00000000-0000-4000-8000-000000000000"
coupon_dataobject

Data to construct an ad hoc coupon inline to apply to this order. If you create a coupon upfront, pass the coupon_id parameter. Otherwise, this coupon_data will be used to scaffold a new ad hoc Coupon.

const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/discounts`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    },
    body: JSON.stringify({
      order_id: '00000000-0000-4000-8000-000000000000',
      coupon_id: '00000000-0000-4000-8000-000000000000',
      coupon_data: {
        name: 'VIP Customer Discount',
        percent_off: 0.075,
        amount_off: 2500
      }
    })
  }
);

const data = await resp.json();
console.log(data);

Responses

DiscountResource

Bodyapplication/json
statusstring[ 0 .. 255 ] charactersrequired

What was the state of the request?

Example: "success"
dataobject(Discount)

A discount represents the application of a coupon to an order or order item. It includes the calculated amount to be discounted based on the coupon configuration.

timestampstring or null(date-time)= 20 characters

The request timestamp (ISO 8601).

Example: "2021-06-30T20:30:00Z"
Response
application/json
{ "status": "success", "data": { "object": "DISCOUNT", "id": "00000000-0000-4000-8000-000000000000", "total_discount_amount": 1000, "coupon": { "id": "00000000-0000-4000-8000-000000000000", "name": "VIP Customer Discount", "is_active": true, "is_percent_off": true, "percent_off": 0.075, "amount_off": 2500, "amount_off_formatted": "$25.00", "promotion_codes": [ { "id": "00000000-0000-4000-8000-000000000000", "code": "SPRING_SALE", "times_redeemed": 10, "start_at": "2021-06-30T20:30:00Z", "end_at": "2021-06-30T20:30:00Z", "max_redemptions": 10, "max_redemptions_per_customer": 10, "first_time_only": true, "minimum_amount": 1000, "is_portal_mobile_app_only": true } ], "discountables": [ { "object": "DISCOUNTABLE", "id": "00000000-0000-4000-8000-000000000000", "discountable": { … } } ], "times_redeemed": 10, "created_at": "2021-06-30T20:30:00Z" } }, "timestamp": "2021-06-30T20:30:00Z" }

Delete discount.

Request

Delete discount.

external: true
Path
discount_idstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

The ID of a discount. UUID Version 4.

Example: 00000000-0000-4000-8000-000000000000
const discountId = '00000000-0000-4000-8000-000000000000';
const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/discounts/${discountId}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

if (resp.status === 204) {
  console.log('success');
} else {
  const data = await resp.text();
  console.log(data);
}

Responses

No Content

Response
No content

Delete order discount.

Request

Delete order discount.

undocumented: true
external: true
Path
orderstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

The ID of an order. UUID Version 4.

Example: 00000000-0000-4000-8000-000000000000
discountstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

The ID of a discount. UUID Version 4.

Example: 00000000-0000-4000-8000-000000000000
const order = '00000000-0000-4000-8000-000000000000';
const discount = '00000000-0000-4000-8000-000000000000';
const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/orders/${order}/discounts/${discount}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

200

Bodyapplication/json
object
Response
application/json
{}

Redeem promotion code.

Request

Redeem promotion code.

undocumented: true
external: true
Path
discountedTypestring[ 1 .. 255 ] charactersrequired

The type of discountable.

Enum"product""fee"
Example: product
discountedstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

The ID of a discountable. UUID Version 4.

Example: 00000000-0000-4000-8000-000000000000
const discountedType = 'product';
const discounted = '00000000-0000-4000-8000-000000000000';
const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/promotion-codes/redeem/${discountedType}/${discounted}`,
  {method: 'POST'}
);

const data = await resp.text();
console.log(data);

Responses

201

Bodyapplication/json
object
Response
application/json
{}

Refund order payment.

Request

Refund order payment.

undocumented: true
external: true
Path
orderPaymentstring(uuid)= 36 characters^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0...required

The ID of an order payment. UUID Version 4.

Example: 00000000-0000-4000-8000-000000000000
const orderPayment = '00000000-0000-4000-8000-000000000000';
const resp = await fetch(
  `https://docs.aryeo.com/_mock/api/aryeo/refunds/${orderPayment}`,
  {
    method: 'POST',
    headers: {
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

201

Bodyapplication/json
object
Response
application/json
{}

Listings

Operations related to listings.

Operations

Notes

Operations related to notes.

Operations

Order Forms

Operations related to order forms.

Operations

Order Items

Operations related to order items.

Operations

Orders

Operations related to orders.

Operations

Payroll

Operations related to payroll.

Operations

Products

Operations related to products.

Operations

Scheduling

Operations related to scheduling.

Operations

Tags

Operations related to tags.

Operations

Tasks

Operations related to tasks.

Operations

Users

Operations related to users.

Operations

Videos

Operations related to videos.

Operations