> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://helpdesk.resmarksystems.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Resmark API: Third Party Auth

The Third Party Authentication endpoint lets an external application redirect a user into Resmark with customer data pre-populated in a new order. Instead of re-entering customer information that already exists in your system, you pass it through the redirect and the user lands on the New Order page with fields already filled in.

This is a browser redirect, not a data-only API call. The user will be prompted to log into Resmark if they aren't already, then directed to the specified page.

### Endpoint

```
GET /login
```

### Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Bearer token from POST /authenticate |
| path | string | No | Page to redirect to after login. Options: `OrderNew` (New Order page), `PickupReport` (Pickup Report page). Defaults to Dashboard. |
| referenceId | string | No | Links this cart to a third-party internal ID. Requires `path=OrderNew`. |
| personEmail | string | No | Customer email address. Requires `path=OrderNew`. |
| personTitle | string | No | Customer title. Requires `path=OrderNew`. |
| personFirstName | string | No | Customer first name. Requires `path=OrderNew`. |
| personNickName | string | No | Customer nickname. Requires `path=OrderNew`. |
| personMiddleName | string | No | Customer middle name. Requires `path=OrderNew`. |
| personLastName | string | No | Customer last name. Requires `path=OrderNew`. |
| personGender | string | No | `MALE` or `FEMALE`. Requires `path=OrderNew`. |
| personOrganization | string | No | Customer organization. Requires `path=OrderNew`. |
| personPhoneNumber | string | No | Customer phone number. Requires `path=OrderNew`. |
| personBirthDate | string | No | Date of birth in ISO format (e.g., `1980-11-30`). Requires `path=OrderNew`. |
| personStreetAddress | string | No | Customer street address. Requires `path=OrderNew`. |
| personCountry | string | No | 2 or 3-character country code per ISO standard. Requires `path=OrderNew`. |
| personPostalCode | string | No | Customer postal code. Requires `path=OrderNew`. |
| personCity | string | No | Customer city. Requires `path=OrderNew`. |
| personState | string | No | Two-character US state or Canadian province code. Requires `path=OrderNew`. |

### Response

A `302 Redirect` to Resmark at the specified path. If `path=OrderNew`, customer fields will be pre-populated with any values you provided.

### Example URL

```
https://app.resmarksystems.com/public/api/login?token=YOUR_TOKEN&path=OrderNew&personFirstName=Tim&personLastName=Turner&personEmail=tim@example.com
```

### Things to Know

- All `person*` parameters require `path=OrderNew`. They are ignored if the path is set to anything else or left as the default.
- The user must log into Resmark to complete the flow. This endpoint handles authentication and redirect together.
- The `referenceId` can be used to tie the resulting Resmark order back to a record in your own system.