Skip to content

Shopware Admin API usage (for the Ratepay SW6 module v6.x and below)

This endpoint reference contains an overview of all Ratepay relevant endpoints for the Shopware Admin API.

Download OpenAPI description
Languages
Servers

http://your_shopware_url/api/

Get the current state of Ratepay processed order-items

Request

Security
oAuth
Path
orderIdstring^[0-9a-f]{32}$required

Identifier of the order

Example: a06c753d068c487991d6a833b4133560
curl -i -X GET \
  http://your_shopware_url/api/ratepay/order-management/load/a06c753d068c487991d6a833b4133560 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Information about the line-items which got processed by Ratepay

Bodyapplication/json
successany
Default true
dataArray of objects
Response
application/json
{ "success": true, "data": [ {} ] }

Report delivery of order-line-items of order processed by Ratepay

Request

Security
oAuth
Path
orderIdstring^[0-9a-f]{32}$required

Identifier of the order

Bodyapplication/json
itemsArray of objects

Items to deliver/cancel/return

curl -i -X POST \
  'http://your_shopware_url/api/ratepay/order-management/deliver/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "id": "a06c753d068c487991d6a833b4133560",
        "quantity": 1,
        "updateStock": true
      }
    ]
  }'

Responses

Item(s) has been successfully delivered

Response
No content

Cancel order-line-items of order processed by Ratepay

Request

Security
oAuth
Path
orderIdstring^[0-9a-f]{32}$required

Identifier of the order

Bodyapplication/json
itemsArray of objects

Items to deliver/cancel/return

curl -i -X POST \
  'http://your_shopware_url/api/ratepay/order-management/cancel/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "id": "a06c753d068c487991d6a833b4133560",
        "quantity": 1,
        "updateStock": true
      }
    ]
  }'

Responses

Item(s) has been successfully canceled

Response
No content

Refund order-line-items of order processed by Ratepay

Request

Security
oAuth
Path
orderIdstring^[0-9a-f]{32}$required

Identifier of the order

Bodyapplication/json
itemsArray of objects

Items to deliver/cancel/return

curl -i -X POST \
  'http://your_shopware_url/api/ratepay/order-management/return/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "id": "a06c753d068c487991d6a833b4133560",
        "quantity": 1,
        "updateStock": true
      }
    ]
  }'

Responses

Item(s) has been successfully refunded

Response
No content

Add order-line-items of order processed by Ratepay

Request

You can add a debit or credit to the processed order by Ratepay. It is required that at least one order-item has been marked as shipped and not returned.

Security
oAuth
Path
orderIdstring^[0-9a-f]{32}$required

Identifier of the order

Bodyapplication/json
grossAmountnumberrequired

Gross amount of debit/credit. Have to be negative for credits.

Example: -5
namestringrequired

Description of the order-line-item.

Example: "Discount for damaged goods"
taxIdstring^[0-9a-f]{32}$required

Tax-id to apply

Example: "a06c753d068c487991d6a833b4133560"
curl -i -X POST \
  'http://your_shopware_url/api/ratepay/order-management/addItem/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "grossAmount": -5,
    "name": "Discount for damaged goods",
    "taxId": "a06c753d068c487991d6a833b4133560"
  }'

Responses

Item(s) has been successfully added

Response
No content