curl --request POST \
--url https://{host}/cleemy-procurement/api/purchases \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": 35,
"natureId": 1,
"costCenterId": 3,
"establishmentId": 1,
"departmentId": 14,
"supplier": {
"id": 6
},
"title": "Purchase entry test",
"axisSectionIds": [
361
]
}
'{
"id": 6655,
"type": "Subscription",
"commitment": {
"id": 6233,
"type": "SubscriptionCommitment",
"owner": {
"id": 416,
"href": "https://example.ilucca.net/api/v3/users/416",
"name": "John Doe",
"firstName": "John",
"lastName": "Doe",
"pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture"
},
"purchase": {
"id": 6655,
"href": "/cleemy-procurement/api/purchases/6655",
"name": "AWS S3",
"type": "Subscription"
},
"attachments": [
{
"id": 14810,
"file": {
"id": "a6dcc9e5-d251-4d3a-86a2-74d9b452b643",
"href": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643",
"name": "mintlify.png",
"displayHref": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643/display"
},
"createdAt": "2024-09-24T10:02:02.4476765+00:00",
"pages": {
"displayHrefTemplate": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643/display/pages/{pageNumber}",
"count": 1
}
}
],
"comment": "Renewal of our AWS S3 subscription.",
"paymentMethod": "SingleUseCard",
"state": "Provisioned",
"startDate": "2024-09-24",
"firstInvoiceDate": "2024-09-24",
"invoicingFrequency": {
"value": 12,
"unit": "Month"
},
"subscriptionDuration": {
"value": 12,
"unit": "Month"
},
"subscriptionEndDate": "2025-09-23",
"contractualEndDate": null,
"periodsCount": 1,
"amountIncludingTaxesPerPeriod": {
"base": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"counter": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"rate": 1
},
"amountIncludingTaxes": {
"base": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"counter": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"rate": 1
},
"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"
}
},
"createdAt": "2024-09-24T10:02:01.7596447+00:00",
"modifiedAt": "2024-10-30T10:57:03.4349936+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"
},
"modifier": {
"name": "Gérôme Durand",
"firstName": "Gérôme",
"lastName": "Durand",
"pictureHref": "https://example.ilucca.net/directory/api/employees/1383/picture",
"id": 1383,
"href": "https://example.ilucca.net/api/v3/users/1383"
},
"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"
},
"nature": {
"name": "Abonnement SAAS",
"id": 1,
"href": "/cleemy-procurement/api/natures/1"
},
"costCenter": {
"name": "406_Product Ops",
"code": "406_Product Ops",
"id": 41,
"href": "/cleemy-procurement/api/costcenters/41"
},
"establishment": {
"name": "Lucca Marseille",
"id": 13,
"href": "https://example.ilucca.net/organization/structure/api/establishments/13"
},
"department": {
"name": "Product Department",
"id": 57,
"href": "https://example.ilucca.net/organization/structure/api/departments/57"
},
"supplier": {
"id": 952,
"type": "Concrete",
"href": "/cleemy-procurement/api/suppliers/952",
"name": "Amazon",
"territory": {
"name": "United States of America",
"id": "US",
"href": "https://example.ilucca.net/organization/structure/api/countries?code=US"
},
"flag": "Unflagged"
},
"availableAmount": {
"base": {
"value": 0,
"currency": "EUR"
},
"counter": {
"value": 0,
"currency": "EUR"
},
"rate": 1
},
"billedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"committedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"confirmedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"requestedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"aggregatedStates": {
"creditNotes": {
"expected": 0,
"toReview": 0,
"partial": 0,
"confirmed": 0,
"pendingRetraction": 0,
"removed": 0,
"bypassed": 0
},
"invoices": {
"expected": 0,
"toReview": 0,
"pendingBreakdown": 0,
"confirmed": 0,
"litigation": 0,
"discarded": 0,
"removed": 0,
"bypassed": 1
},
"invoicesPayments": {
"toPay": 0,
"underReview": 0,
"emitting": 0,
"paid": 1,
"onHold": 0
},
"creditNotesPayments": {
"available": 0,
"consumed": 0,
"unavailable": 0
}
},
"axisSections": [],
"title": "AWS S3",
"state": "Closed"
}Create a Purchase.
curl --request POST \
--url https://{host}/cleemy-procurement/api/purchases \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": 35,
"natureId": 1,
"costCenterId": 3,
"establishmentId": 1,
"departmentId": 14,
"supplier": {
"id": 6
},
"title": "Purchase entry test",
"axisSectionIds": [
361
]
}
'{
"id": 6655,
"type": "Subscription",
"commitment": {
"id": 6233,
"type": "SubscriptionCommitment",
"owner": {
"id": 416,
"href": "https://example.ilucca.net/api/v3/users/416",
"name": "John Doe",
"firstName": "John",
"lastName": "Doe",
"pictureHref": "https://example.ilucca.net/directory/api/employees/416/picture"
},
"purchase": {
"id": 6655,
"href": "/cleemy-procurement/api/purchases/6655",
"name": "AWS S3",
"type": "Subscription"
},
"attachments": [
{
"id": 14810,
"file": {
"id": "a6dcc9e5-d251-4d3a-86a2-74d9b452b643",
"href": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643",
"name": "mintlify.png",
"displayHref": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643/display"
},
"createdAt": "2024-09-24T10:02:02.4476765+00:00",
"pages": {
"displayHrefTemplate": "/cleemy-procurement/api/files/a6dcc9e5-d251-4d3a-86a2-74d9b452b643/display/pages/{pageNumber}",
"count": 1
}
}
],
"comment": "Renewal of our AWS S3 subscription.",
"paymentMethod": "SingleUseCard",
"state": "Provisioned",
"startDate": "2024-09-24",
"firstInvoiceDate": "2024-09-24",
"invoicingFrequency": {
"value": 12,
"unit": "Month"
},
"subscriptionDuration": {
"value": 12,
"unit": "Month"
},
"subscriptionEndDate": "2025-09-23",
"contractualEndDate": null,
"periodsCount": 1,
"amountIncludingTaxesPerPeriod": {
"base": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"counter": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"rate": 1
},
"amountIncludingTaxes": {
"base": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"counter": {
"excludingTaxes": {
"value": 3239.57,
"currency": "EUR"
},
"taxes": [],
"includingTaxes": {
"value": 3239.57,
"currency": "EUR"
}
},
"rate": 1
},
"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"
}
},
"createdAt": "2024-09-24T10:02:01.7596447+00:00",
"modifiedAt": "2024-10-30T10:57:03.4349936+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"
},
"modifier": {
"name": "Gérôme Durand",
"firstName": "Gérôme",
"lastName": "Durand",
"pictureHref": "https://example.ilucca.net/directory/api/employees/1383/picture",
"id": 1383,
"href": "https://example.ilucca.net/api/v3/users/1383"
},
"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"
},
"nature": {
"name": "Abonnement SAAS",
"id": 1,
"href": "/cleemy-procurement/api/natures/1"
},
"costCenter": {
"name": "406_Product Ops",
"code": "406_Product Ops",
"id": 41,
"href": "/cleemy-procurement/api/costcenters/41"
},
"establishment": {
"name": "Lucca Marseille",
"id": 13,
"href": "https://example.ilucca.net/organization/structure/api/establishments/13"
},
"department": {
"name": "Product Department",
"id": 57,
"href": "https://example.ilucca.net/organization/structure/api/departments/57"
},
"supplier": {
"id": 952,
"type": "Concrete",
"href": "/cleemy-procurement/api/suppliers/952",
"name": "Amazon",
"territory": {
"name": "United States of America",
"id": "US",
"href": "https://example.ilucca.net/organization/structure/api/countries?code=US"
},
"flag": "Unflagged"
},
"availableAmount": {
"base": {
"value": 0,
"currency": "EUR"
},
"counter": {
"value": 0,
"currency": "EUR"
},
"rate": 1
},
"billedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"committedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"confirmedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"requestedAmount": {
"base": {
"value": 3214.66,
"currency": "EUR"
},
"counter": {
"value": 3214.66,
"currency": "EUR"
},
"rate": 1
},
"aggregatedStates": {
"creditNotes": {
"expected": 0,
"toReview": 0,
"partial": 0,
"confirmed": 0,
"pendingRetraction": 0,
"removed": 0,
"bypassed": 0
},
"invoices": {
"expected": 0,
"toReview": 0,
"pendingBreakdown": 0,
"confirmed": 0,
"litigation": 0,
"discarded": 0,
"removed": 0,
"bypassed": 1
},
"invoicesPayments": {
"toPay": 0,
"underReview": 0,
"emitting": 0,
"paid": 1,
"onHold": 0
},
"creditNotesPayments": {
"available": 0,
"consumed": 0,
"unavailable": 0
}
},
"axisSections": [],
"title": "AWS S3",
"state": "Closed"
}API key. Value must be formatted like so: lucca application={api_key}.
The purchase to create.
Purchase.
Type of purchase.
Subscription, OneTime Title of the purchase.
Read-only. Commitment of the purchase. readOnly: true
Show child attributes
ID of the user who is the owner of the purchase.
Owner of the purchase.
Show child attributes
ID of the nature to which the purchase belongs.
ID of the cost-center to which the purchase belongs.
Read-only. Cost-center to which the purchase belongs.
Show child attributes
ID of the establishment to which the purchase belongs.
Read-only. Establishment to which the purchase belongs.
Show child attributes
ID of the department to which the purchase belongs.
Read-only. Department to which the purchase belongs.
Show child attributes
Supplier of the purchase.
Show child attributes
Read-only. Available amount of the purchase.
Show child attributes
Read-only. Billed amount of the purchase.
Show child attributes
Read-only. Committed amount of the purchase.
Show child attributes
Read-only. Confirmed amount of the purchase.
Show child attributes
Read-only. Requested amount of the purchase.
Show child attributes
Write-only. IDs of the axis-sections to which the purchase belongs.
Read-only. User ID who is the author of the purchase.
Show child attributes
Read-only. User ID who is the modifier of the purchase.
Show child attributes
Created
Purchase.
Type of purchase.
Subscription, OneTime Title of the purchase.
Created, Processing, Ongoing, Denied, Closed, Cancelled Read-only. Commitment of the purchase. readOnly: true
Show child attributes
Owner of the purchase.
Show child attributes
Nature of the purchase.
Show child attributes
Read-only. Cost-center to which the purchase belongs.
Show child attributes
Read-only. Establishment to which the purchase belongs.
Show child attributes
Read-only. Department to which the purchase belongs.
Show child attributes
Supplier of the purchase.
Show child attributes
Read-only. Available amount of the purchase.
Show child attributes
Read-only. Billed amount of the purchase.
Show child attributes
Read-only. Committed amount of the purchase.
Show child attributes
Read-only. Confirmed amount of the purchase.
Show child attributes
Read-only. Requested amount of the purchase.
Show child attributes
Read-only. Aggregated states of the purchase.
Show child attributes
Read-only. Axis-sections to which the purchase belongs.
Show child attributes
Read-only. Date of creation of the purchase
Read-only. User ID who is the author of the purchase.
Show child attributes
Read-only. Date of last modification of the purchase.
Read-only. User ID who is the modifier of the purchase.
Show child attributes
Was this page helpful?