Step 3: Detailed Agreement API Endpoint Changes
Note that in all v2 requests below, accountId
is the account ID you are provisioning from. For Portal partners, this account is generally your top-level account.
Get Available Offers for a customer/account
Old API Request:
- Offers List – GET
https://api.yextapis.com/v1/offers
- Response: List of Offers
New API Request:
- Available Services: List – GET
https://api.yextapis.com/v2/accounts/{accountId}/availableservices
- Response: List of Available Services
Key Change:
- Offer
id
is replaced withsku
Get existing customers/accounts
Old API Request:
- Customers List – GET
https://api.yextapis.com/v1/customers
- Response: List of Customers
New API Request:
- Accounts: List – GET
https://api.yextapis.com/v2/accounts/
- Response: List of Accounts
Create Customer Request with Single Location and Subscribe Location
Old API Request:
- POST
https://api.yextapis.com/v1/customers/
- Response: 201 or 202 Success Response
New API Request:
- Add Requests: Create (New Location) – POST
https://api.yextapis.com/v2/accounts/{accountId}/newlocationaddrequests
- Response: Add Service Request Object
Create Customer Request Multiple Location and Subscribe Locations
Old API Request:
- POST
https://api.yextapis.com/v1/customers/
- Response: 201 or 202 Success Response
New API Request:
- Multiple Add Requests: Create (New Location) – POST
https://api.yextapis.com/v2/accounts/{accountId}/newlocationaddrequests
- Note you will need to issue one call per location
- Response: Add Service Request Object
Key Change:
- You cannot create a multi-location account with a single API request
Subscribe an Existing Location
Old API Request:
- PUT
https://api.yextapis.com/v1/customers/customerId/subscriptions/subscriptionId/locationIds/locationId
- Response: 201 or 202 Success Response
New API Request:
- Multiple Add Requests: Create (Existing Location) – POST
https://api.yextapis.com/v2/accounts/{accountId}/existinglocationaddrequests
- Note you will need to issue one call per location
- Response: Add Service Request Object
Check Order Status
Old API Request:
- GET
https://api.yextapis.com/v1/ofers/orderId
- Response: Order Object
New API Request:
- Add Requests: Get – GET
https://api.yextapis.com/v2/accounts/{accountId}/addRequests/[addRequestId]
- Response: Add Service Request Object
Cancel Subscription
Old API Request:
- PUT
https://api.yextapis.com/v1/customers/customerId/subscriptions/subscriptionId/locationIds/locationId
- Response: 200 Response
New API Request:
- Services: Cancel – POST
https://api.yextapis.com/v2/accounts/{accountId}/cancelservices
- Response: List of Service Objects
Uncancel Subscription
Old API Request:
- PUT
https://api.yextapis.com/v1/customers/customerId/subscriptions/subscriptionId/locationIds
- Response: 200 Response
New API Request:
- This functionality is not explicitly supported in v2. Create a new Service using Add Request: Create (Existing Location).
Update Customer Information
Old API Request:
- PUT
https://api.yextapis.com/v1/customers/customerId
- Response: 201 or 202 Success Response
New API Request:
- Update request not supported in v2
<% elem.innerText %>