Accept an offer
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"offer": {
"id": "<string>",
"fromOrgId": "<string>",
"toOrgId": "<string>",
"rightId": "<string>",
"scope": "<string>",
"termsRef": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"derivedRightId": "<string>",
"contentHash": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"derivedRight": {
"id": "<string>",
"orgId": "<string>",
"basisId": "<string>",
"parentRightId": "<string>",
"scope": "<string>",
"effectiveFrom": "2023-11-07T05:31:56Z",
"effectiveUntil": "2023-11-07T05:31:56Z",
"contentHash": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Offers
Accept an offer
Accept a PROPOSED offer. Issues a derived right with the offer’s scope, marks the offer ACCEPTED, and links derivedRightId. Requires scope offers:write. Request body is ignored.
POST
/
v1
/
offers
/
{offerId}
/
accept
Accept an offer
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/offers/{offerId}/accept \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"offer": {
"id": "<string>",
"fromOrgId": "<string>",
"toOrgId": "<string>",
"rightId": "<string>",
"scope": "<string>",
"termsRef": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"derivedRightId": "<string>",
"contentHash": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"derivedRight": {
"id": "<string>",
"orgId": "<string>",
"basisId": "<string>",
"parentRightId": "<string>",
"scope": "<string>",
"effectiveFrom": "2023-11-07T05:31:56Z",
"effectiveUntil": "2023-11-07T05:31:56Z",
"contentHash": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Authorizations
API key sent as Authorization: Bearer <api-key>.
Path Parameters
Offer id.
⌘I