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 (self resource)
  • Guest token endpoints: anonymous access 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)

MethodURLPurpose
GET/V1/b2bquote/quotesList quotes (any customer)
GET/V1/b2bquote/quotes/{quoteId}Get quote by id
POST/V1/b2bquote/quotesCreate draft quote
PUT/V1/b2bquote/quotes/{quoteId}Save/update quote
DELETE/V1/b2bquote/quotes/{quoteId}Delete quote
POST/V1/b2bquote/quotes/{quoteId}/statusChange status (admin flow)
POST/V1/b2bquote/quotes/{quoteId}/pricing/applyApply pricing rules
POST/V1/b2bquote/quotes/{quoteId}/workflow/applyApply workflow rules

Customer (ownership checked)

MethodURLPurpose
GET/V1/b2bquote/me/quotesList my quotes
GET/V1/b2bquote/me/quotes/{quoteId}Get my quote
POST/V1/b2bquote/quotes/{quoteId}/submitSubmit quote
POST/V1/b2bquote/quotes/{quoteId}/acceptAccept quote
POST/V1/b2bquote/quotes/{quoteId}/itemsAdd item
PUT/V1/b2bquote/quotes/{quoteId}/items/{itemId}Update item
DELETE/V1/b2bquote/quotes/{quoteId}/items/{itemId}Remove item
POST/V1/b2bquote/quotes/{quoteId}/messagesAdd message
POST/V1/b2bquote/quotes/{quoteId}/attachmentsAdd attachment
POST/V1/b2bquote/quotes/{quoteId}/addressesSet addresses

Guest (token-based)

MethodURLPurpose
GET/V1/b2bquote/guest/quotes/{token}Get guest quote by access token
POST/V1/b2bquote/guest/quotes/{token}/acceptAccept guest quote by access token

Categories, Tags, Status Transitions, Revisions (ACL-protected)

AreaMethodURL
CategoriesGET/V1/b2bquote/categories
CategoriesGET/V1/b2bquote/categories/active
CategoriesGET/V1/b2bquote/categories/{categoryId}
CategoriesPOST/V1/b2bquote/categories
CategoriesDELETE/V1/b2bquote/categories/{categoryId}
TagsGET/V1/b2bquote/tags
TagsGET/V1/b2bquote/tags/popular
TagsGET/V1/b2bquote/tags/{tagId}
TagsGET/V1/b2bquote/quotes/{quoteId}/tags
TagsPOST/V1/b2bquote/tags
TagsDELETE/V1/b2bquote/tags/{tagId}
Status transitionsGET/V1/b2bquote/statuses/transitions
Status transitionsGET/V1/b2bquote/statuses/transitions/{id}
Status transitionsPOST/V1/b2bquote/statuses/transitions
Status transitionsDELETE/V1/b2bquote/statuses/transitions/{id}
RevisionsGET/V1/b2bquote/quotes/{quoteId}/revisions
RevisionsGET/V1/b2bquote/revisions/{revisionId}
RevisionsGET/V1/b2bquote/revisions/{revisionId1}/compare/{revisionId2}
RevisionsPOST/V1/b2bquote/quotes/{quoteId}/revisions
RevisionsPOST/V1/b2bquote/quotes/{quoteId}/revisions/{revisionId}/rollback

Notes & Tips

Response:

{ "order_id": 1001, "increment_id": "000001001" }

Error Codes

CodeDescription
400Bad request (validation error)
401Unauthorized
403Forbidden (permission denied)
404Quote not found
409Conflict (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

EventPayload
quote.createdNew quote data
quote.updatedUpdated quote data
quote.status_changedStatus change details

Found an issue with this documentation? Let us know