Power Automate: Advanced Actions - NovaGL/coupa-resources GitHub Wiki
Now you know how the Coupa API works with Power Automate, lets try and make some advanced actions.
GET
Refer to main page
POST
Creating an Address
The following examples explains how to create a ship to address via the Coupa API
Scopes: core.common.read core.common.write
General
Title | Value |
---|---|
Summary | Addresses - Create Address |
Description | Create Address |
Operation ID | Address_Create |
Request
Import from Sample
Title | Value |
---|---|
Verb | POST |
URL | /api/addresses/ |
Headers | Accept application/json (don’t forget to default the value) |
Body
{
"name": "string",
"location-code": "string",
"street1": "string",
"street2": "string",
"city": "string",
"state": "string",
"postal-code": "string"
}
Response
Click import from sample and copy the above body into the body field.
PUT
Updating an existing address
This example is quite similar to the above except for the fact we are updating not creating
Scopes: core.common.read core.common.write
General
Title | Value |
---|---|
Summary | Addresses - Update an Address |
Description | Update Address |
Operation ID | Address_Update |
Request
Import from Sample
Title | Value |
---|---|
Verb | POST |
URL | /api/addresses/{id} |
Headers | Accept application/json (don’t forget to default the value) |
Body
{
"name": "string",
"location-code": "string",
"street1": "string",
"street2": "string",
"city": "string",
"state": "string",
"postal-code": "string"
}
Response
Click import from sample and copy the above body into the body field.
PATCH
Updating an existing item
To update an item we have a choice to update everything or only select elements. We will use PATCH so it will only update selected parts of the item
Scopes: core.item.read core.item.write
General
Title | Value |
---|---|
Summary | Items - Update an existing item |
Description | Update an existing items |
Operation ID | Item_Update |
Request
Import from Sample
Title | Value |
---|---|
Verb | PATCH |
URL | /api/items/{id} |
Headers | Accept application/json (don’t forget to default the value) |
Body | Add all the elements you want to update in the body |
For example we might only want to bulk deactivate items.
{
"active": false
}
DELETE
Delete an Invoice with NEW Status
To delete an invoice we have to make sure its in new status and able to be deleted
Scopes: core.invoice.delete
General
Title | Value |
---|---|
Summary | Invoices - Delete Invoices by ID |
Description | Delete Invoices by ID |
Operation ID | Invoices_Delete |
Request
Import from Sample
Title | Value |
---|---|
Verb | DELETE |
URL | /api/invoices/{id} |
Headers | Accept application/json (don’t forget to default the value) |
Body | Leave empty |
Response
Not valid for this request