Ga naar inhoud

Create an offer

POST
/api/v1/offers
curl --request POST \
--url https://example.com/api/v1/offers \
--header 'Content-Type: application/json' \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \
--data '{ "id": "example", "asset_id": "example", "access_policy_id": "example", "contract_policy_id": "example", "approval": "automatic" }'

Puts a product in the catalog under an access policy (who sees it) and a contract policy (the conditions of the agreement).

Media typeapplication/json

An offer as it is created or changed.

object
id

Left out: one is made.

string | null
asset_id
required
string
access_policy_id
required
string
contract_policy_id
required
string
approval
One of:
null

OK.

Media typeapplication/json

An offer: a product with the policies under which it is in the catalog.

object
id
required
string
asset_id
required

The product.

string
access_policy_id
required

Who sees the offer in the catalog.

string
contract_policy_id
required

The conditions of the agreement.

string
approval

Whether a provider operator must approve each contract request.

string
Allowed values: automatic manual
created_at
string format: date-time

Example

{
"approval": "automatic"
}

Unknown product or policy, or automatic approval of steering.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

No valid session, DPoP-bound token or API key.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}