REST API
Complete API documentation for B2B Quote integration.
Requires the optional REST API add-on:
mageb2b/b2b-quote-api(MageB2B_B2BQuoteApi).GraphQL is a separate add-on:
Authentication
Magento REST authentication depends on the endpoint type:
- Admin / Integration endpoints: Integration token + ACL permission
- Customer endpoints: customer token (
selfresource) - Guest token endpoints:
anonymousaccess but require a guest quote access token
Example (admin/integration token):
curl -X GET "https://your-store.com/rest/V1/b2bquote/quotes" \
-H "Authorization: Bearer {token}"
Endpoint Groups
Admin (ACL-protected)
| Method | URL | Purpose |
|---|---|---|
GET |
/V1/b2bquote/quotes |
List quotes (any customer) |
GET |
/V1/b2bquote/quotes/{quoteId} |
Get quote by id |
POST |
/V1/b2bquote/quotes |
Create draft quote |
PUT |
/V1/b2bquote/quotes/{quoteId} |
Save/update quote |
DELETE |
/V1/b2bquote/quotes/{quoteId} |
Delete quote |
POST |
/V1/b2bquote/quotes/{quoteId}/status |
Change status (admin flow) |
POST |
/V1/b2bquote/quotes/{quoteId}/pricing/apply |
Apply pricing rules |
POST |
/V1/b2bquote/quotes/{quoteId}/workflow/apply |
Apply workflow rules |
Customer (ownership checked)
| Method | URL | Purpose |
|---|---|---|
GET |
/V1/b2bquote/me/quotes |
List my quotes |
GET |
/V1/b2bquote/me/quotes/{quoteId} |
Get my quote |
POST |
/V1/b2bquote/quotes/{quoteId}/submit |
Submit quote |
POST |
/V1/b2bquote/quotes/{quoteId}/accept |
Accept quote |
POST |
/V1/b2bquote/quotes/{quoteId}/items |
Add item |
PUT |
/V1/b2bquote/quotes/{quoteId}/items/{itemId} |
Update item |
DELETE |
/V1/b2bquote/quotes/{quoteId}/items/{itemId} |
Remove item |
POST |
/V1/b2bquote/quotes/{quoteId}/messages |
Add message |
POST |
/V1/b2bquote/quotes/{quoteId}/attachments |
Add attachment |
POST |
/V1/b2bquote/quotes/{quoteId}/addresses |
Set addresses |
Guest (token-based)
| Method | URL | Purpose |
|---|---|---|
GET |
/V1/b2bquote/guest/quotes/{token} |
Get guest quote by access token |
POST |
/V1/b2bquote/guest/quotes/{token}/accept |
Accept guest quote by access token |
Categories, Tags, Status Transitions, Revisions (ACL-protected)
| Area | Method | URL |
|---|---|---|
| Categories | GET |
/V1/b2bquote/categories |
| Categories | GET |
/V1/b2bquote/categories/active |
| Categories | GET |
/V1/b2bquote/categories/{categoryId} |
| Categories | POST |
/V1/b2bquote/categories |
| Categories | DELETE |
/V1/b2bquote/categories/{categoryId} |
| Tags | GET |
/V1/b2bquote/tags |
| Tags | GET |
/V1/b2bquote/tags/popular |
| Tags | GET |
/V1/b2bquote/tags/{tagId} |
| Tags | GET |
/V1/b2bquote/quotes/{quoteId}/tags |
| Tags | POST |
/V1/b2bquote/tags |
| Tags | DELETE |
/V1/b2bquote/tags/{tagId} |
| Status transitions | GET |
/V1/b2bquote/statuses/transitions |
| Status transitions | GET |
/V1/b2bquote/statuses/transitions/{id} |
| Status transitions | POST |
/V1/b2bquote/statuses/transitions |
| Status transitions | DELETE |
/V1/b2bquote/statuses/transitions/{id} |
| Revisions | GET |
/V1/b2bquote/quotes/{quoteId}/revisions |
| Revisions | GET |
/V1/b2bquote/revisions/{revisionId} |
| Revisions | GET |
/V1/b2bquote/revisions/{revisionId1}/compare/{revisionId2} |
| Revisions | POST |
/V1/b2bquote/quotes/{quoteId}/revisions |
| Revisions | POST |
/V1/b2bquote/quotes/{quoteId}/revisions/{revisionId}/rollback |
Notes & Tips
- For quote lifecycle, statuses, and transitions, see:
- For guest quotes and token access, see:
Response:
{
"order_id": 1001,
"increment_id": "000001001"
}
Error Codes
| Code | Description |
|---|---|
| 400 | Bad request (validation error) |
| 401 | Unauthorized |
| 403 | Forbidden (permission denied) |
| 404 | Quote not found |
| 409 | Conflict (invalid status transition) |
Rate Limiting
- 1000 requests per hour per token
- Rate limit headers included in response
Webhooks
Configure webhooks for quote events:
Stores > Configuration > MageB2B > B2B Quote > API
| Event | Payload |
|---|---|
quote.created |
New quote data |
quote.updated |
Updated quote data |
quote.status_changed |
Status change details |