curl --request PUT \
--url https://api.invopop.com/transform/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "ES",
"description": "<string>",
"draft": true,
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "bill/invoice",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
]
}
'import requests
url = "https://api.invopop.com/transform/v1/workflows/{id}"
payload = {
"country": "ES",
"description": "<string>",
"draft": True,
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": True
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "bill/invoice",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": True
}
],
"notes": "<string>",
"summary": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'ES',
description: '<string>',
draft: true,
name: '<string>',
rescue: [
{
action: 'email.send',
config: {},
id: '186522a6-e697-4e34-8498-eee961bcb845',
name: '<string>',
next: [
{
code: '<string>',
step_id: '186522a6-e697-4e34-8498-eee961bcb845',
steps: '<array>',
stop: true
}
],
notes: '<string>',
summary: '<string>'
}
],
schema: 'bill/invoice',
steps: [
{
action: 'email.send',
config: {},
id: '186522a6-e697-4e34-8498-eee961bcb845',
name: '<string>',
next: [
{
code: '<string>',
step_id: '186522a6-e697-4e34-8498-eee961bcb845',
steps: '<array>',
stop: true
}
],
notes: '<string>',
summary: '<string>'
}
]
})
};
fetch('https://api.invopop.com/transform/v1/workflows/{id}', 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://api.invopop.com/transform/v1/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'ES',
'description' => '<string>',
'draft' => true,
'name' => '<string>',
'rescue' => [
[
'action' => 'email.send',
'config' => [
],
'id' => '186522a6-e697-4e34-8498-eee961bcb845',
'name' => '<string>',
'next' => [
[
'code' => '<string>',
'step_id' => '186522a6-e697-4e34-8498-eee961bcb845',
'steps' => '<array>',
'stop' => true
]
],
'notes' => '<string>',
'summary' => '<string>'
]
],
'schema' => 'bill/invoice',
'steps' => [
[
'action' => 'email.send',
'config' => [
],
'id' => '186522a6-e697-4e34-8498-eee961bcb845',
'name' => '<string>',
'next' => [
[
'code' => '<string>',
'step_id' => '186522a6-e697-4e34-8498-eee961bcb845',
'steps' => '<array>',
'stop' => true
]
],
'notes' => '<string>',
'summary' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.invopop.com/transform/v1/workflows/{id}"
payload := strings.NewReader("{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.invopop.com/transform/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/transform/v1/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"country": "<string>",
"created_at": "<string>",
"description": "<string>",
"disabled": true,
"draft": true,
"hash": "<string>",
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "<string>",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"updated_at": "<string>",
"version": "<string>",
"versions": [
{
"created_at": "<string>",
"hash": "<string>",
"name": "<string>",
"src": "<string>",
"src_id": "<string>",
"version": "<string>"
}
]
}Create a workflow
Create a new workflow with the given UUID.
curl --request PUT \
--url https://api.invopop.com/transform/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "ES",
"description": "<string>",
"draft": true,
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "bill/invoice",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
]
}
'import requests
url = "https://api.invopop.com/transform/v1/workflows/{id}"
payload = {
"country": "ES",
"description": "<string>",
"draft": True,
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": True
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "bill/invoice",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": True
}
],
"notes": "<string>",
"summary": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'ES',
description: '<string>',
draft: true,
name: '<string>',
rescue: [
{
action: 'email.send',
config: {},
id: '186522a6-e697-4e34-8498-eee961bcb845',
name: '<string>',
next: [
{
code: '<string>',
step_id: '186522a6-e697-4e34-8498-eee961bcb845',
steps: '<array>',
stop: true
}
],
notes: '<string>',
summary: '<string>'
}
],
schema: 'bill/invoice',
steps: [
{
action: 'email.send',
config: {},
id: '186522a6-e697-4e34-8498-eee961bcb845',
name: '<string>',
next: [
{
code: '<string>',
step_id: '186522a6-e697-4e34-8498-eee961bcb845',
steps: '<array>',
stop: true
}
],
notes: '<string>',
summary: '<string>'
}
]
})
};
fetch('https://api.invopop.com/transform/v1/workflows/{id}', 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://api.invopop.com/transform/v1/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'ES',
'description' => '<string>',
'draft' => true,
'name' => '<string>',
'rescue' => [
[
'action' => 'email.send',
'config' => [
],
'id' => '186522a6-e697-4e34-8498-eee961bcb845',
'name' => '<string>',
'next' => [
[
'code' => '<string>',
'step_id' => '186522a6-e697-4e34-8498-eee961bcb845',
'steps' => '<array>',
'stop' => true
]
],
'notes' => '<string>',
'summary' => '<string>'
]
],
'schema' => 'bill/invoice',
'steps' => [
[
'action' => 'email.send',
'config' => [
],
'id' => '186522a6-e697-4e34-8498-eee961bcb845',
'name' => '<string>',
'next' => [
[
'code' => '<string>',
'step_id' => '186522a6-e697-4e34-8498-eee961bcb845',
'steps' => '<array>',
'stop' => true
]
],
'notes' => '<string>',
'summary' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.invopop.com/transform/v1/workflows/{id}"
payload := strings.NewReader("{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.invopop.com/transform/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/transform/v1/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"ES\",\n \"description\": \"<string>\",\n \"draft\": true,\n \"name\": \"<string>\",\n \"rescue\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ],\n \"schema\": \"bill/invoice\",\n \"steps\": [\n {\n \"action\": \"email.send\",\n \"config\": {},\n \"id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"name\": \"<string>\",\n \"next\": [\n {\n \"code\": \"<string>\",\n \"step_id\": \"186522a6-e697-4e34-8498-eee961bcb845\",\n \"steps\": \"<array>\",\n \"stop\": true\n }\n ],\n \"notes\": \"<string>\",\n \"summary\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"country": "<string>",
"created_at": "<string>",
"description": "<string>",
"disabled": true,
"draft": true,
"hash": "<string>",
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"rescue": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"schema": "<string>",
"steps": [
{
"action": "email.send",
"config": {},
"id": "186522a6-e697-4e34-8498-eee961bcb845",
"name": "<string>",
"next": [
{
"code": "<string>",
"step_id": "186522a6-e697-4e34-8498-eee961bcb845",
"steps": "<array>",
"stop": true
}
],
"notes": "<string>",
"summary": "<string>"
}
],
"updated_at": "<string>",
"version": "<string>",
"versions": [
{
"created_at": "<string>",
"hash": "<string>",
"name": "<string>",
"src": "<string>",
"src_id": "<string>",
"version": "<string>"
}
]
}Authorizations
Use the Bearer scheme with a valid JWT token to authenticate requests. Example: Authorization: Bearer <token>
Path Parameters
UUID (any version) of the workflow to create.
"186522a6-e697-4e34-8498-eee961bcb845"
Body
ISO country code the workflow will be used in.
"ES"
Description of the workflow.
When true, the current version of the workflow will not be published.
Name of the workflow.
Array of steps to execute en case of an unmanaged KO.
Show child attributes
Show child attributes
Short schema name that the workflow will be allowed to process.
"bill/invoice"
Array of Steps to use for this workflow.
Show child attributes
Show child attributes
Response
OK
ISO country code the workflow will be used for.
When the workflow was created.
Description of the workflow
When true, this workflow can no longer be used.
When true, this workflow is still in draft mode and will not be used in jobs.
Partial SHA256 hash of the workflow's contents.
The UUID (any version) of the workflow.
"186522a6-e697-4e34-8498-eee961bcb845"
Name of the workflow
List of steps to execute when a KO status is returned by a previous step and not explicitly managed.
Show child attributes
Show child attributes
Short schema name that the workflow will be allowed to process.
List of steps to execute.
Show child attributes
Show child attributes
When the workflow was last updated.
Version of the workflow's contents currently defined.
List of previously published versions of this workflow, only provided when requesting the primary workflow.
Show child attributes
Show child attributes
Was this page helpful?