Order Approval

Endpoints for Order Approval addon

Order Approval addon

Count Pending Order Approvals

get

Returns the count of pending order approvals for the current customer (excluding approved, declined, and ordered states). Requires admin permission.

Authorizations
sw-context-tokenstringRequired
Responses
chevron-right
200

Count of pending order approvals

application/json
countintegerOptional

Number of pending order approvals

get
/b2b/order-approval/settings/count-pending

Execute Order Approval

post

Executes an approved order approval by creating a real Shopware order. Requires employee login and the order approval must be in 'approved' state. Automatically refreshes the cart before execution to ensure latest prices and stock.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Body
skipRefreshbooleanOptional

Skip automatic refresh before execution (default: false). Not recommended unless you know what you're doing.

Default: false
Responses
chevron-right
200

Order Approval executed successfully

application/json
post
/b2b/order-approval/{orderApprovalId}/execute

Update Pending Order Approvals with New Settings

post

Updates all pending order approvals for the current customer with new approval settings. This ensures that existing open order approvals use the latest approval configuration instead of outdated settings. Requires admin permission.

Authorizations
sw-context-tokenstringRequired
Responses
chevron-right
200

Pending order approvals updated successfully

application/json
updatedCountintegerOptional

Number of order approvals that were updated

post
/b2b/order-approval/settings/update-pending

Remind Single Approver

post

Sends a reminder email to a specific approver for an order approval.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Body
approverIdstringRequired

Employee ID of the approver to remind

Responses
chevron-right
200

Reminder sent successfully

application/json
remindersSentintegerOptional
approverIdstringOptional
post
/b2b/order-approval/{orderApprovalId}/remind

Remind All Approvers

post

Sends reminder emails to all pending approvers for an order approval.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Responses
chevron-right
200

Reminders sent successfully

application/json
remindersSentintegerOptional
post
/b2b/order-approval/{orderApprovalId}/remind/all

Delete Order Approval Line Item

post

Deletes a line item from an order approval. Requires employee login and appropriate permissions. Only allowed for order approvals in 'open', 'pending', or 'approved' state.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

lineItemIdstringRequired

Line Item ID

Body
reasonstringRequired

Reason for deleting the line item

Responses
chevron-right
200

Line item deleted successfully

No content

post
/b2b/order-approval/{orderApprovalId}/line-items/{lineItemId}/delete

No content

Refresh Order Approval

post

Refreshes an order approval by recalculating prices, checking stock availability, and updating shipping costs. Detects changes and may require re-approval if significant price changes are detected.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Body
forcebooleanOptional

Force refresh even if minimum time interval has not passed (default: false)

Default: false
sendEmailOnChangesbooleanOptional

Send email notification if changes are detected (default: false)

Default: false
Responses
chevron-right
200

Order Approval refreshed successfully

application/json
post
/b2b/order-approval/{orderApprovalId}/refresh

Create Order Approval from Cart

post

Creates a new Order Approval from the current shopping cart. Requires customer login.

Authorizations
sw-context-tokenstringRequired
Body
cartTokenstringRequired

Shopping cart token

customerCommentstringOptional

Optional comment from customer

Responses
chevron-right
200

Order Approval created successfully

application/json
anyOptional
post
/order-approval/create

No content

List Order Approvals

post

Returns a list of Order Approvals for the logged-in customer. Supports Shopware Criteria for filtering, sorting, and pagination.

Authorizations
sw-context-tokenstringRequired
Body
anyOptional
Responses
chevron-right
200

Returns a list of Order Approvals

application/json
totalintegerOptional

Total count of Order Approvals

dataOrderApproval[]Optional
post
/order-approval/list

Get Customer Order Approval Settings

get

Retrieves the order approval settings for the current customer, including approver configuration and approval mode.

Authorizations
sw-context-tokenstringRequired
Responses
chevron-right
200

Customer order approval settings

application/json
get
/b2b/order-approval/customer-settings

Update Customer Order Approval Settings

post

Updates the order approval settings for the current customer. Requires employee login.

Authorizations
sw-context-tokenstringRequired
Body
modestring · enumRequired

Approval mode

Possible values:
approverEmployeeIdsstring[]Optional

List of employee IDs who can approve

nValueinteger · min: 1 · nullableOptional

Required number of approvals for 'n-of' mode

Responses
chevron-right
200

Settings updated successfully

No content

post
/b2b/order-approval/customer-settings

No content

Update Order Approval

post

Updates an order approval by refreshing prices and stock. This is a convenience endpoint that calls the refresh service. Requires employee login.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Responses
chevron-right
200

Order Approval updated successfully

No content

post
/b2b/order-approval/{orderApprovalId}/update

No content

Get Order Approval Activity History

get

Retrieves the activity history for an order approval, including all actions, comments, and metadata.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Responses
chevron-right
200

Order Approval activity history

application/json
get
/b2b/order-approval/{orderApprovalId}/activity

Get Approver Status

get

Retrieves the status of all approvers for an order approval, including who has approved, declined, or is still pending.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Responses
chevron-right
200

Approver status

application/json
get
/b2b/order-approval/{orderApprovalId}/approvers

Get Order Approval Details

get

Retrieves detailed information about a specific order approval, including line items, approvers, and status.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Responses
chevron-right
200

Order Approval details

application/json
anyOptional
get
/b2b/order-approval/{orderApprovalId}

No content

Decline Order Approval

post

Declines an order approval request. Requires employee login and appropriate permissions.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Body
commentstringRequired

Required comment explaining the decline reason

ccEmployeeIdsstring[]Optional

Optional list of employee IDs to CC in the decline notification

Responses
chevron-right
200

Order Approval declined successfully

application/json
anyOptional
post
/b2b/order-approval/{orderApprovalId}/decline

No content

Approve Order Approval

post

Approves an order approval request. Requires employee login and appropriate permissions.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

Body
commentstringOptional

Optional comment for the approval

ccEmployeeIdsstring[]Optional

Optional list of employee IDs to CC in the approval notification

Responses
chevron-right
200

Order Approval approved successfully

application/json
anyOptional
post
/b2b/order-approval/{orderApprovalId}/approve

No content

Get Budget Summary for Order Approvals

get

Retrieves a summary of order approvals that are using a specific budget, including total reserved amounts and pending approvals.

Authorizations
sw-context-tokenstringRequired
Path parameters
budgetIdstringRequired

Budget ID

Responses
chevron-right
200

Budget summary

application/json
get
/b2b/order-approval/budget/{budgetId}/summary

Update Order Approval Line Item

patch

Updates a line item in an order approval (e.g., quantity). Requires employee login and appropriate permissions. Only allowed for order approvals in 'open', 'pending', or 'approved' state.

Authorizations
sw-context-tokenstringRequired
Path parameters
orderApprovalIdstringRequired

Order Approval ID

lineItemIdstringRequired

Line Item ID

Body
quantitynumberRequired

New quantity for the line item

Responses
chevron-right
200

Line item updated successfully

No content

patch
/b2b/order-approval/{orderApprovalId}/line-items/{lineItemId}

No content

Last updated

Was this helpful?