> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agscard.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Create AGS grading orders for your own account or for your customers.

The AGS Partner API lets your app create grading orders and follow them as they move through grading.

Orders can belong to your own AGS account, using a personal access token, or to your customers' AGS accounts. Each customer signs in to AGS and approves your app once, and your app then calls the API with an access token for that customer.

## Base URL

```
https://app.agscard.com/api/partner/v1
```

## How it fits together

**1. Get your credentials**

Contact AGS. For your own account you'll receive a personal access token. To act for your customers, we register your app and you'll receive a client ID, and a client secret if your app has a server. See [Authentication](https://docs.agscard.com/authentication.md).

**2. Get an access token**

Use your personal access token as it is. For a customer, send them to AGS to sign in and approve your app, then exchange the returned code for an access token.

**3. Send the tenant with every request**

Every request includes the `X-Tenant` header for the customer's region. See [Tenants](https://docs.agscard.com/tenants.md).

**4. Create an order**

Look up the service levels, shipping methods, optional services and card IDs, then create the order. See [Creating orders](https://docs.agscard.com/creating-orders.md).

**5. The customer pays on AGS**

The order response includes a `payment_url`. Send the customer there to pay. Your app never handles payment details.

## Rate limits

Each customer can make up to 60 requests a minute through the API. Requests over the limit get a `429` with the `rate_limited` error code and a `Retry-After` header. See [Errors](https://docs.agscard.com/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.