fature.al eshte platforma e faturimit dhe fiskalizimit per bizneset ne Shqiperi. Hap nje llogari
Skip to content
fature.al API Menu

Confirm a pre-order

POST /api/partner/v1/wolt/orders/{id}/confirm-preorder Requires authentication Rate limited by the `api-global` limiter

Send a bearer token in the Authorization header.

Confirms a customer-scheduled pre-order. It is parked until Wolt releases it into production near its due time, after which it can be marked ready.

Full URL: https://fature.al/api/partner/v1/wolt/orders/{id}/confirm-preorder

Path parameters

Name Type Required Description
id integer yes The order's Fatureal id, from the feed or the order list.

Header parameters

Name Type Required Description
Idempotency-Key string yes Your own unique key for this action. A retry with the same key replays the first result instead of relaying a second action to Wolt, and the replay carries an Idempotent-Replayed: true header. Kept for 24 hours.

Responses

201 Created

Field Type Description
status boolean
data object
data.order object
data.order.customer object
data.order.customer.name string, nullable
data.order.customer.phone string, nullable Shared by Wolt only for self-delivery orders
data.order.customer.note string, nullable Customer note left with the order
data.order.company object, nullable B2B billing company, or null for a normal consumer order
data.order.company.tax_id string Tax id (NUIS/NIPT) the customer asked to bill
data.order.company.name string, nullable
data.order.company.address string, nullable
data.order.preorder object, nullable Scheduled pre-order info, or null for an instant order
data.order.preorder.time string Scheduled time (ISO-8601)
data.order.preorder.status string, nullable Wolt pre-order status
data.order.lines array
data.order.lines[].name string Item name
data.order.lines[].quantity number
data.order.lines[].unit_price number Unit price in major units
data.order.lines[].total number Line total in major units, after discount
data.order.lines[].discount number Discount applied to the line, major units
data.order.lines[].product object, nullable Linked internal product, or null when the Wolt item is unmapped
data.order.lines[].options array Chosen modifiers/options for the line
data.order.totals object
data.order.totals.subtotal_before_discount number Basket total before any discount, major units
data.order.totals.discount number Total discount applied, major units
data.order.totals.total number Charged total, major units
data.order.totals.currency string ISO 4217 currency code
data.order.totals.campaigns array Applied promotion labels

400 The Idempotency-Key header is missing.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

403 The company has no Wolt add-on, the token has no Wolt right, or it resolves to no single active venue.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

404 No such order for this venue.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

409 The order's current status does not allow this action, or a call with the same Idempotency-Key is still in flight. Nothing was relayed to Wolt.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

422 The action failed on our side and was not completed.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

429 Rate limit reached: 60 writes a minute per token. Retry after the number of seconds in the Retry-After header.

Field Type Description
message string

502 Wolt refused or did not answer. Safe to retry with the same Idempotency-Key.

Field Type Description
status boolean Always false
message string Localised explanation, safe to log but not to branch on
code string Stable machine readable reason: `unauthenticated`, `wolt_not_enabled`, `forbidden`, `no_venue`, `order_not_found`, `invalid_transition`, `invalid_data`, `action_failed`, `wolt_upstream_error`, `idempotency_key_required`, `idempotency_in_progress`

Example request

cURL
curl -X POST 'https://fature.al/api/partner/v1/wolt/orders/8801/confirm-preorder' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Client-Id: YOUR_CLIENT_ID' \
  -H 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: a2f1c9e4-5b60-4d7a-9c31-8e0f2b6d4a17'
PHP (Laravel)
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
    'Authorization' => 'Bearer YOUR_TOKEN',
    'X-Client-Id' => 'YOUR_CLIENT_ID',
    'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
    'Accept' => 'application/json',
    'Idempotency-Key' => 'a2f1c9e4-5b60-4d7a-9c31-8e0f2b6d4a17',
])->post('https://fature.al/api/partner/v1/wolt/orders/8801/confirm-preorder');

$data = $response->json();
PHP (Guzzle)
use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('POST', 'https://fature.al/api/partner/v1/wolt/orders/8801/confirm-preorder', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_TOKEN',
        'X-Client-Id' => 'YOUR_CLIENT_ID',
        'X-Client-Secret' => 'YOUR_CLIENT_SECRET',
        'Accept' => 'application/json',
        'Idempotency-Key' => 'a2f1c9e4-5b60-4d7a-9c31-8e0f2b6d4a17',
    ],
]);

$data = json_decode((string) $response->getBody(), true);
JavaScript
const response = await fetch('https://fature.al/api/partner/v1/wolt/orders/8801/confirm-preorder', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Client-Id': 'YOUR_CLIENT_ID',
    'X-Client-Secret': 'YOUR_CLIENT_SECRET',
    'Accept': 'application/json',
    'Idempotency-Key': 'a2f1c9e4-5b60-4d7a-9c31-8e0f2b6d4a17'
  }
});

const data = await response.json();

Example response

201
{
    "status": true,
    "data": {
        "order": {
            "customer": {
                "name": "Jane Doe",
                "phone": "+15551234567",
                "note": "note"
            },
            "company": {
                "tax_id": "tax id",
                "name": "Jane Doe",
                "address": "1 Example Street"
            },
            "preorder": {
                "time": "time",
                "status": "status"
            },
            "lines": [
                {
                    "name": "Jane Doe",
                    "quantity": 2,
                    "unit_price": 1999,
                    "total": 4200,
                    "discount": 3,
                    "product": [],
                    "options": [
                        "options"
                    ]
                }
            ],
            "totals": {
                "subtotal_before_discount": 4200,
                "discount": 3,
                "total": 4200,
                "currency": "USD",
                "campaigns": [
                    "campaigns"
                ]
            }
        }
    }
}
400
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}
403
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}
404
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}
409
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}
422
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}
429
{
    "message": "Hello there"
}
502
{
    "status": true,
    "message": "Hello there",
    "code": "code"
}

Regjistrimi eshte falas.

Regjistrohu ne fature.al

This page as Markdown, or the whole API as OpenAPI.