transferOrderRequestFulfillment
Submits a transfer order for fulfillment, transitioning it from DRAFT to OPENED state. Once opened, the transfer order is sent to the warehouse for processing.
Announce transfers at least 48 hours before the expected delivery date. Stock transfers that arrive unannounced may be refused or delayed by the warehouse.
Required scope: edit_transfer_orders
Mutation
graphql
mutation TransferOrderRequestFulfillment($id: String!) {
transferOrderRequestFulfillment(id: $id) {
id
fulfillmentOrderId
type
state
date
}
}Return type: FulfillmentActionType
| Field | Description |
|---|---|
id | Unique identifier of this fulfillment request action |
fulfillmentOrderId | The transfer order UUID |
type | Action type — REQUEST_FULFILLMENT for this mutation |
state | Processing state of the action (ACCEPTED, REJECTED) |
date | Timestamp of the action |
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | String | ✅ | Internal UUID of the transfer order to submit for fulfillment |
Fulfillment flow
Example Variables
json
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}Example Response
json
{
"data": {
"transferOrderRequestFulfillment": {
"id": "action-uuid-001",
"fulfillmentOrderId": "550e8400-e29b-41d4-a716-446655440000",
"type": "REQUEST_FULFILLMENT",
"state": "ACCEPTED",
"date": "2024-02-10T14:00:00.000Z"
}
}
}Code Examples
bash
curl -X POST https://api-v3.happycolis.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"query": "mutation TransferOrderRequestFulfillment($id: String!) { transferOrderRequestFulfillment(id: $id) { id fulfillmentOrderId type state date } }",
"variables": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}'js
const mutation = `
mutation TransferOrderRequestFulfillment($id: String!) {
transferOrderRequestFulfillment(id: $id) {
id
fulfillmentOrderId
type
state
date
}
}
`;
const response = await fetch('https://api-v3.happycolis.com/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.ACCESS_TOKEN}`,
},
body: JSON.stringify({
query: mutation,
variables: { id: '550e8400-e29b-41d4-a716-446655440000' },
}),
});
const { data } = await response.json();
console.log(data.transferOrderRequestFulfillment);python
import os
import requests
mutation = """
mutation TransferOrderRequestFulfillment($id: String!) {
transferOrderRequestFulfillment(id: $id) {
id
fulfillmentOrderId
type
state
date
}
}
"""
response = requests.post(
'https://api-v3.happycolis.com/graphql',
headers={'Authorization': f'Bearer {os.environ["ACCESS_TOKEN"]}'},
json={
'query': mutation,
'variables': {'id': '550e8400-e29b-41d4-a716-446655440000'},
},
)
data = response.json()['data']
print(data['transferOrderRequestFulfillment'])php
<?php
$mutation = <<<'GQL'
mutation TransferOrderRequestFulfillment($id: String!) {
transferOrderRequestFulfillment(id: $id) {
id
fulfillmentOrderId
type
state
date
}
}
GQL;
$ch = curl_init('https://api-v3.happycolis.com/graphql');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'query' => $mutation,
'variables' => ['id' => '550e8400-e29b-41d4-a716-446655440000'],
]),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . getenv('ACCESS_TOKEN'),
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result['data']['transferOrderRequestFulfillment']);go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
mutation := `
mutation TransferOrderRequestFulfillment($id: String!) {
transferOrderRequestFulfillment(id: $id) {
id
fulfillmentOrderId
type
state
date
}
}`
body, _ := json.Marshal(map[string]any{
"query": mutation,
"variables": map[string]any{"id": "550e8400-e29b-41d4-a716-446655440000"},
})
req, _ := http.NewRequest("POST", "https://api-v3.happycolis.com/graphql", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("ACCESS_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var result map[string]any
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
}