Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Create a service

Scope: sales:services.write https://api.alladdin.com/api/v2/services

Creates a new service in your catalog. Services represent non-physical items you sell or purchase, such as consulting hours, subscriptions, or support contracts.
The response returns the new service id. You can then use this ID when adding line items to invoices and other documents.

Request body

object name string required

Service name

description string | null optional

Service description

price number optional

Unit sale price

cost number | null optional

Unit cost price

tax number | null optional

Tax percentage

taxes[] string[] | null optional

List of tax identifiers to apply

tags[] string[] | null optional

List of tag names

sales_channel_id string | null optional

Sales channel identifier

code string | null optional

Internal reference code

color string | null optional

Display color

duration number | null optional

Duration in minutes

Request

python
import requests

url = "https://api.alladdin.com/api/v2/services"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "name": "Consulting",
    "description": "Consulting service",
    "price": 100,
    "cost": 50,
    "tax": 21,
    "taxes": [
        "string"
    ],
    "tags": [
        "string"
    ],
    "sales_channel_id": "string",
    "code": "string",
    "color": "string",
    "duration": 0
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201 Service created application/json object id string

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json 429 Rate limit exceeded application/json

Next →Update a service →