Skip to main content
POST
/
cleemy-procurement
/
api
/
commitments
/
{id}
/
requests
Create a commitment request
curl --request POST \
  --url https://{host}/cleemy-procurement/api/commitments/{id}/requests \
  --header 'Authorization: <authorization>'
import requests

url = "https://{host}/cleemy-procurement/api/commitments/{id}/requests"

headers = {"Authorization": "<authorization>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: '<authorization>'}};

fetch('https://{host}/cleemy-procurement/api/commitments/{id}/requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/cleemy-procurement/api/commitments/{id}/requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{host}/cleemy-procurement/api/commitments/{id}/requests"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{host}/cleemy-procurement/api/commitments/{id}/requests")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/cleemy-procurement/api/commitments/{id}/requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "id": 0,
  "owner": {
    "name": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture",
    "id": 416,
    "href": "https://example.ilucca.net/api/v3/users/416"
  },
  "assignee": {
    "name": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture",
    "id": 416,
    "href": "https://example.ilucca.net/api/v3/users/416"
  },
  "businessObject": {
    "id": 54635,
    "costDate": "2025-04-14",
    "invoiceDate": "2025-04-14",
    "amountIncludingTaxes": {
      "excludingTaxes": {
        "value": 120,
        "currency": "EUR"
      },
      "taxes": []
    },
    "type": "OneTimeCommitment",
    "attachmentIds": [],
    "state": "Created",
    "comment": "Comment",
    "paymentMethod": null,
    "createdAt": "2024-09-24T10:02:01.9244011+00:00",
    "author": {
      "name": "John Doe",
      "firstName": "John",
      "lastName": "Doe",
      "pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture",
      "id": 416,
      "href": "https://example.ilucca.net/api/v3/users/416"
    },
    "modifiedAt": "2024-09-24T13:52:40.3558953+00:00",
    "modifier": {
      "name": "Matt Bawss",
      "firstName": "Matt",
      "lastName": "Bawss",
      "pictureHref": "https://example.ilucca.net/directory/api/employees/979/picture",
      "id": 979,
      "href": "https://example.ilucca.net/api/v3/users/979"
    }
  },
  "stepId": 1,
  "workflowId": "qsd5q1c2xv",
  "templateId": 1,
  "state": "Pending",
  "createdAt": "2025-07-01T13:27:11.485Z",
  "modifiedAt": "2025-07-01T13:27:11.485Z",
  "author": {
    "name": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture",
    "id": 416,
    "href": "https://example.ilucca.net/api/v3/users/416"
  },
  "modifier": {
    "name": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture",
    "id": 416,
    "href": "https://example.ilucca.net/api/v3/users/416"
  }
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Path Parameters

id
integer<int32>
required

ID of the commitment you want to create a request for.

Response

201 - application/json

Commitment request successfuly created.

Approval request (workflow) for a purchase commitment.

id
integer<int32>
owner
Reference to a user · object

Reference to a user.

assignee
Reference to a user · object

Reference to a user.

businessObject
Subscription Commitment · object

Commitment for a subscription.

stepId
integer<int32>
read-only
workflowId
string
read-only
templateId
integer<int32>
read-only
state
enum<string>
read-only
Available options:
Pending,
Cancelled,
Denied,
Approved
createdAt
string<date-time>
read-only
modifiedAt
string<date-time>
read-only
author
Reference to a user · object

Reference to a user.

modifier
Reference to a user · object

Reference to a user.