# Awin

> Track Awin transactions and commission, manage programme partnerships, build tracking links and offers, and report conversions.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/awin

## Actions

### Accept partnership invitation

Accept an advertiser's invitation to join their programme, agreeing to its terms.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertiser (`advertiser_id`, text, required): The advertiser whose invitation to accept.
- Accept the programme's terms (`accept_terms`, true/false, required): Turn on to accept the advertiser's programme terms. Awin refuses the invitation without it.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "advertiserId": "example",
    "joinedAt": "example",
    "publisherId": "example",
    "status": "example"
  }
}
```

### Approve or decline transaction

Approve a pending transaction so the publisher is paid, or decline it with a reason. Awin applies it shortly after, as a job.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Transaction ID (`transaction_id`, text, required): The Awin ID of the transaction.
- Decision (`decision`, text, required): Approve or decline the transaction. One of: `approve`, `decline`.
- Decline reason (`decline_reason`, text): Why it is declined, such as an order returned. Needed to decline.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "jobId": "example",
    "status": "example"
  }
}
```

### Approve publisher application

Approve a publisher's application to join your programme, with a message to them.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Publisher (`publisher_id`, text, required): The publisher whose application to approve.
- Message (`message`, text, required): A message to the publisher, such as a welcome.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {}
}
```

### Create offer

Publish a promotion or voucher code to your publishers in My Offers. Offers can't be removed through the API.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Title (`title`, text, required): The offer's title, such as Black Friday 30% off (up to 300 characters).
- Description (`description`, text, required): What the offer is (up to 500 characters).
- Terms (`terms`, text, required): The offer's terms and conditions.
- Type (`type_of_offer`, text, required): A promotion, or a voucher code customers enter at checkout. One of: `promotion`, `voucher` (Voucher code).
- Voucher code (`voucher_code`, text): The code customers enter. Needed for a voucher code.
- Landing page (`url`, text, required): The page on your site publishers should link to.
- Starts (`start_date`, date, required): The first day of the offer (from midnight UTC).
- Ends (`end_date`, date, required): The last day of the offer (until 23:59:59 UTC).
- Categories (`categories`, list, required): The kinds of product the offer is for. One or more of: `4` (Electronics), `61` (Computers & Software), `97` (Clothing & Accessories), `99` (Health & Beauty), `173` (Gifts, Gadgets & Toys), `246` (Sports), `281` (Finance), `328` (Travel), `347` (Telephones & Faxes), `361` (Home Appliances), and 7 more.
- Regions (`offer_regions`, list): Where customers can use the offer. Leave empty for everywhere. One or more of: `1` (United Kingdom), `2` (Ireland), `3` (United States), `4` (Canada), `5` (France), `6` (Germany), `7` (Austria), `8` (Belgium), `9` (Netherlands), `10` (Spain), and 35 more.
- Campaign (`campaign`, text): The campaign the offer is part of.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {}
}
```

### Create tracking link

Create an Awin tracking link to an advertiser's page, optionally with a short link.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertiser (`advertiser_id`, text, required): The advertiser (programme) you work with.
- Page to link to (`destination_url`, text): The page on the advertiser's site to link to. Leave empty for their home page.
- Campaign (`campaign`, text): A campaign name to report the link's clicks and sales under.
- Click reference (`click_ref`, text): Your own reference, returned with each sale the link brings.
- Make a short link (`shorten`, true/false): Also make a short link. Each uses part of your daily short-link allowance.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "shortUrl": "example",
    "url": "example"
  }
}
```

### Decline partnership invitation

Decline an advertiser's invitation to join their programme. They can invite you again later.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertiser (`advertiser_id`, text, required): The advertiser whose invitation to decline.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {}
}
```

### Get advertiser performance report

Get a publisher account's impressions, clicks, sales and commission for each advertiser over a period.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- From (`start_date`, date, required): The first day of the report.
- To (`end_date`, date, required): The last day of the report.
- Region (`region`, text, required): The region of the programmes to report on. One of: `AT` (Austria), `AU` (Australia), `BE` (Belgium), `BR` (Brazil (BRL)), `BU` (Brazil (USD)), `CA` (Canada), `CH` (Switzerland), `DE` (Germany), `DK` (Denmark), `ES` (Spain), and 10 more.
- Count by (`date_type`, text): Count transactions by the date of the sale or of its approval. Leave empty for the sale. One of: `transaction` (Date of the sale), `validation` (Date it was approved or declined).
- Time zone (`timezone`, text): The time zone the report's days are counted in. Leave empty for UTC. One of: `UTC`, `Europe/London`, `Europe/Dublin`, `Europe/Paris`, `Europe/Berlin`, `Europe/Helsinki`, `US/Eastern`, `US/Central`, `US/Mountain`, `US/Pacific`, and 6 more.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserId": 1,
      "advertiserName": "example",
      "bonusComm": 1,
      "bonusNo": 1,
      "bonusValue": 1,
      "clicks": 1,
      "confirmedComm": 1,
      "confirmedNo": 1,
      "confirmedValue": 1,
      "currency": "example",
      "declinedComm": 1,
      "declinedNo": 1,
      "declinedValue": 1,
      "impressions": 1,
      "pendingComm": 1,
      "pendingNo": 1,
      "pendingValue": 1,
      "publisherId": 1,
      "publisherName": "example",
      "region": "example",
      "totalComm": 1,
      "totalNo": 1,
      "totalValue": 1
    }
  ]
}
```

### Get approval job

Check whether Awin has finished approving or declining transactions, and which failed.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Job ID (`job_id`, text, required): The job ID from Approve or decline transaction.
- Include (`output`, text): Also list the transactions that failed, or every transaction. One of: `errors` (Only the transactions that failed), `all` (Every transaction).

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "errors": 1,
    "failedTransactions": [
      {
        "code": "example",
        "description": "example",
        "orderRef": "example",
        "transactionId": 1
      }
    ],
    "jobId": "example",
    "status": "example",
    "transactions": 1
  }
}
```

### Get campaign performance report

Get a publisher account's clicks, sales and commission for each campaign value it put in its tracking links.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- From (`start_date`, date, required): The first day of the report.
- To (`end_date`, date, required): The last day of the report.
- Region (`region`, text, required): The region of the programmes to report on. One of: `AT` (Austria), `AU` (Australia), `BE` (Belgium), `BR` (Brazil (BRL)), `BU` (Brazil (USD)), `CA` (Canada), `CH` (Switzerland), `DE` (Germany), `DK` (Denmark), `ES` (Spain), and 10 more.
- Advertisers (`advertiser_ids`, list): Only these advertisers. Leave empty for all of them.
- Campaign (`campaign`, text): Only campaigns whose value starts with this (at least 3 characters).
- Include traffic without a campaign (`include_without_campaign`, true/false): Also count clicks and sales whose link had no campaign value.
- Split by (`interval`, text): Split the figures by day, month or year. Leave empty for one total per campaign. One of: `day`, `month`, `year`.
- Time zone (`timezone`, text): The time zone the report's days are counted in. Leave empty for UTC. One of: `UTC`, `Europe/London`, `Europe/Dublin`, `Europe/Paris`, `Europe/Berlin`, `Europe/Helsinki`, `US/Eastern`, `US/Central`, `US/Mountain`, `US/Pacific`, and 6 more.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserId": 1,
      "advertiserName": "example",
      "campaign": "example",
      "commissionAmount": {},
      "date": "example",
      "quantity": {},
      "saleAmount": {}
    }
  ]
}
```

### Get programme details

Get a programme's description, commission range and performance figures, such as earnings per click and approval rate.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertiser (`advertiser_id`, text, required): The advertiser (programme) you work with.
- Relationship (`relationship`, text): Your relationship with the programme. Leave empty for joined. One of: `joined`, `pending` (Applied, waiting for approval), `suspended`, `rejected`, `notjoined` (Not joined), `any`.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "commissionRange": [
      {
        "max": 1,
        "min": 1,
        "type": "example"
      }
    ],
    "kpi": {
      "approvalPercentage": 1,
      "averagePaymentTime": "example",
      "awinIndex": 1,
      "conversionRate": 1,
      "epc": 1,
      "validationDays": 1
    },
    "programmeInfo": {
      "clickThroughUrl": "example",
      "currencyCode": "example",
      "deeplinkEnabled": true,
      "description": "example",
      "displayUrl": "example",
      "id": 1,
      "linkStatus": "example",
      "logoUrl": "example",
      "membershipStatus": "example",
      "name": "example",
      "primaryRegion": {
        "countryCode": "example",
        "name": "example"
      },
      "primarySector": "example",
      "trackingTransparency": [
        "example"
      ],
      "validDomains": [
        {
          "domain": "example"
        }
      ]
    }
  }
}
```

### Get programme transactions

Get your advertiser account's transactions by their Awin IDs.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Transaction IDs (`transaction_ids`, list, required): The Awin IDs of the transactions.
- Include basket products (`show_basket_products`, true/false): Also return the products in each order, where the advertiser shares them.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserCountry": "example",
      "advertiserId": 1,
      "amendReason": "example",
      "amended": true,
      "clickDate": "example",
      "clickDevice": "example",
      "clickRefs": {
        "clickRef": "example"
      },
      "commissionAmount": {
        "amount": 1,
        "currency": "example"
      },
      "commissionStatus": "example",
      "customerCountry": "example",
      "declineReason": "example",
      "id": 1,
      "lapseTime": 1,
      "orderRef": "example",
      "paidToPublisher": true,
      "paymentId": 1,
      "publisherId": 1,
      "saleAmount": {
        "amount": 1,
        "currency": "example"
      },
      "siteName": "example",
      "transactionDate": "example",
      "transactionDevice": "example",
      "transactionParts": [
        {
          "amount": 1,
          "commissionAmount": 1,
          "commissionGroupCode": "example",
          "commissionGroupId": 1,
          "commissionGroupName": "example"
        }
      ],
      "type": "example",
      "url": "example",
      "validationDate": "example",
      "voucherCode": "example",
      "voucherCodeUsed": true
    }
  ]
}
```

### Get publisher performance report

Get your advertiser account's impressions, clicks, sales and commission for each publisher over a period.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- From (`start_date`, date, required): The first day of the report.
- To (`end_date`, date, required): The last day of the report.
- Count by (`date_type`, text): Count transactions by the date of the sale or of its approval. Leave empty for the sale. One of: `transaction` (Date of the sale), `validation` (Date it was approved or declined).
- Time zone (`timezone`, text): The time zone the report's days are counted in. Leave empty for UTC. One of: `UTC`, `Europe/London`, `Europe/Dublin`, `Europe/Paris`, `Europe/Berlin`, `Europe/Helsinki`, `US/Eastern`, `US/Central`, `US/Mountain`, `US/Pacific`, and 6 more.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserId": 1,
      "advertiserName": "example",
      "bonusComm": 1,
      "bonusNo": 1,
      "bonusValue": 1,
      "clicks": 1,
      "confirmedComm": 1,
      "confirmedNo": 1,
      "confirmedValue": 1,
      "currency": "example",
      "declinedComm": 1,
      "declinedNo": 1,
      "declinedValue": 1,
      "impressions": 1,
      "pendingComm": 1,
      "pendingNo": 1,
      "pendingValue": 1,
      "publisherId": 1,
      "publisherName": "example",
      "region": "example",
      "tags": [
        "example"
      ],
      "totalComm": 1,
      "totalNo": 1,
      "totalValue": 1
    }
  ]
}
```

### Get transactions

Get a publisher account's transactions by their Awin IDs, to check their status.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Transaction IDs (`transaction_ids`, list, required): The Awin IDs of the transactions.
- Include basket products (`show_basket_products`, true/false): Also return the products in each order, where the advertiser shares them.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserCountry": "example",
      "advertiserId": 1,
      "amendReason": "example",
      "amended": true,
      "clickDate": "example",
      "clickDevice": "example",
      "clickRefs": {
        "clickRef": "example"
      },
      "commissionAmount": {
        "amount": 1,
        "currency": "example"
      },
      "commissionStatus": "example",
      "customerCountry": "example",
      "declineReason": "example",
      "id": 1,
      "lapseTime": 1,
      "orderRef": "example",
      "paidToPublisher": true,
      "paymentId": 1,
      "publisherId": 1,
      "saleAmount": {
        "amount": 1,
        "currency": "example"
      },
      "siteName": "example",
      "transactionDate": "example",
      "transactionDevice": "example",
      "transactionParts": [
        {
          "amount": 1,
          "commissionAmount": 1,
          "commissionGroupCode": "example",
          "commissionGroupId": 1,
          "commissionGroupName": "example"
        }
      ],
      "type": "example",
      "url": "example",
      "validationDate": "example",
      "voucherCode": "example",
      "voucherCodeUsed": true
    }
  ]
}
```

### List accounts

List the publisher and advertiser accounts your Awin login can reach, with your role on each.

**Inputs**

- Account type (`type`, text): Only publisher or only advertiser accounts. Leave empty for both. One of: `publisher`, `advertiser`.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "accounts": [
      {
        "accountId": 1,
        "accountName": "example",
        "accountType": "example",
        "userRole": "example"
      }
    ],
    "userId": 1
  }
}
```

### List advertiser partnerships

List the advertisers a publisher account has a partnership with, including invitations waiting for an answer.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Partnership status (`partnership_status`, list): Only partnerships in these statuses. Leave empty for all. One or more of: `ACTIVE`, `INVITE_PENDING` (Invited, waiting for an answer), `INVITE_REJECTED` (Invitation declined), `APPLICATION_PENDING` (Applied, waiting for an answer), `APPLICATION_REJECTED` (Application rejected), `ADVERTISER_SUSPENDED` (Suspended by the advertiser), `PUBLISHER_LEFT` (Publisher left).
- Sort by (`sort`, text): The order of the list. Leave empty for the most recently changed first. One of: `-partnership.statusUpdatedAt` (Most recently changed first), `partnership.statusUpdatedAt` (Least recently changed first), `name`.
- Limit (`limit`, number): How many to return, up to 1000. Leave empty for 10. From 1 to 1000.
- Skip (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. From 0 to 10000.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "offset": 1,
    "results": [
      {
        "id": "example",
        "logoUrl": "example",
        "name": "example",
        "partnership": {
          "status": "example",
          "statusUpdatedAt": "example"
        },
        "type": "example"
      }
    ],
    "total": 1
  }
}
```

### List commission groups

List an advertiser's commission groups with the commission each pays you.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertiser (`advertiser_id`, text, required): The advertiser (programme) you work with.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "advertiser": 1,
    "commissionGroups": [
      {
        "amount": 1,
        "currency": "example",
        "groupCode": "example",
        "groupId": 1,
        "groupName": "example",
        "percentage": 1,
        "ratesEnd": "example",
        "ratesStart": "example",
        "type": "example"
      }
    ],
    "publisher": 1
  }
}
```

### List offers

List advertisers' promotions and voucher codes, as in My Offers in Awin.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Advertisers (`membership`, text): Offers from advertisers you've joined, haven't joined, or both. Leave empty for both. One of: `all` (All advertisers), `joined` (Advertisers I've joined), `notJoined` (Advertisers I haven't joined).
- Type (`offer_type`, text): Promotions, voucher codes, or both. Leave empty for both. One of: `all` (Promotions and voucher codes), `promotion` (Promotions), `voucher` (Voucher codes).
- Status (`offer_status`, text): Offers running now, ending soon or not started. Leave empty for running now. One of: `active` (Running now), `expiringSoon` (Ending in the next 7 days), `upcoming` (Not started yet).
- Advertisers (`advertiser_ids`, list): Only these advertisers. Leave empty for all of them.
- Regions (`regions`, list): Only offers valid in one of these regions. One or more of: `AT` (Austria), `AU` (Australia), `BE` (Belgium), `BR` (Brazil (BRL)), `BU` (Brazil (USD)), `CA` (Canada), `CH` (Switzerland), `DE` (Germany), `DK` (Denmark), `ES` (Spain), and 10 more.
- Exclusive offers only (`exclusive_only`, true/false): Only offers exclusive to your account.
- Changed since (`updated_since`, date): Only offers added or changed since this day.
- Page (`page`, number): The page to read. Leave empty for the first. At least 1.
- Offers per page (`page_size`, number): How many offers per page, from 10 to 200. Leave empty for 200. From 10 to 200.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "advertiser": {
          "id": 1,
          "joined": true,
          "name": "example"
        },
        "dateAdded": "example",
        "description": "example",
        "endDate": "example",
        "promotionId": 1,
        "regions": {
          "all": true,
          "list": [
            {
              "countryCode": "example",
              "name": "example"
            }
          ]
        },
        "startDate": "example",
        "terms": "example",
        "title": "example",
        "type": "example",
        "url": "example",
        "urlTracking": "example",
        "voucher": {
          "attributable": true,
          "code": "example",
          "exclusive": true
        }
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 1,
      "total": 1
    }
  }
}
```

### List payments

List the payments Awin made to a publisher account, newest first.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 25. From 1 to 100.
- Skip (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. From 0 to 10000.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "offset": 1,
    "results": [
      {
        "amount": {
          "amount": "example",
          "currency": "example"
        },
        "paymentId": "example",
        "paymentMethod": "example",
        "periodEnd": "example",
        "processingDate": "example"
      }
    ],
    "total": 1
  }
}
```

### List programme transactions

List the sales and leads your advertiser account's publishers brought in a period of up to 31 days.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- From (`start_date`, date and time, required): The start of the period. The period can be at most 31 days long.
- To (`end_date`, date and time, required): The end of the period.
- Date to filter on (`date_type`, text): Which date the period applies to. Leave empty for the date of the sale. One of: `transaction` (Date of the sale), `validation` (Date it was approved or declined), `amendment` (Date it was amended).
- Status (`status`, text): Only transactions with this status. Leave empty for all. One of: `pending`, `approved`, `declined`, `deleted`.
- Publishers (`publisher_ids`, list): Only these publishers. Leave empty for all of them.
- Include basket products (`show_basket_products`, true/false): Also return the products in each order, where the advertiser shares them.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserCountry": "example",
      "advertiserId": 1,
      "amendReason": "example",
      "amended": true,
      "clickDate": "example",
      "clickDevice": "example",
      "clickRefs": {
        "clickRef": "example"
      },
      "commissionAmount": {
        "amount": 1,
        "currency": "example"
      },
      "commissionStatus": "example",
      "customerCountry": "example",
      "declineReason": "example",
      "id": 1,
      "lapseTime": 1,
      "orderRef": "example",
      "paidToPublisher": true,
      "paymentId": 1,
      "publisherId": 1,
      "saleAmount": {
        "amount": 1,
        "currency": "example"
      },
      "siteName": "example",
      "transactionDate": "example",
      "transactionDevice": "example",
      "transactionParts": [
        {
          "amount": 1,
          "commissionAmount": 1,
          "commissionGroupCode": "example",
          "commissionGroupId": 1,
          "commissionGroupName": "example"
        }
      ],
      "type": "example",
      "url": "example",
      "validationDate": "example",
      "voucherCode": "example",
      "voucherCodeUsed": true
    }
  ]
}
```

### List programmes

List the advertisers' programmes for a publisher account, by your relationship with them.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- Relationship (`relationship`, text): Only programmes you have this relationship with. Leave empty for every programme. One of: `joined`, `pending` (Applied, waiting for approval), `suspended`, `rejected`, `notjoined` (Not joined).
- Region (`country`, text): Only programmes in this region. One of: `AT` (Austria), `AU` (Australia), `BE` (Belgium), `BR` (Brazil (BRL)), `BU` (Brazil (USD)), `CA` (Canada), `CH` (Switzerland), `DE` (Germany), `DK` (Denmark), `ES` (Spain), and 10 more.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "clickThroughUrl": "example",
      "currencyCode": "example",
      "description": "example",
      "displayUrl": "example",
      "id": 1,
      "linkStatus": "example",
      "logoUrl": "example",
      "name": "example",
      "primaryRegion": {
        "countryCode": "example",
        "name": "example"
      },
      "primarySector": "example",
      "status": "example",
      "validDomains": [
        {
          "domain": "example"
        }
      ]
    }
  ]
}
```

### List publisher partnerships

List the publishers your advertiser account has a partnership with, including applications waiting for an answer.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Partnership status (`partnership_status`, list): Only partnerships in these statuses. Leave empty for all. One or more of: `ACTIVE`, `INVITE_PENDING` (Invited, waiting for an answer), `INVITE_REJECTED` (Invitation declined), `APPLICATION_PENDING` (Applied, waiting for an answer), `APPLICATION_REJECTED` (Application rejected), `ADVERTISER_SUSPENDED` (Suspended by the advertiser), `PUBLISHER_LEFT` (Publisher left).
- Sort by (`sort`, text): The order of the list. Leave empty for the most recently changed first. One of: `-partnership.statusUpdatedAt` (Most recently changed first), `partnership.statusUpdatedAt` (Least recently changed first), `name`.
- Limit (`limit`, number): How many to return, up to 1000. Leave empty for 10. From 1 to 1000.
- Skip (`offset`, number): How many to skip, for reading the next page. Leave empty to start at the first. From 0 to 10000.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "offset": 1,
    "results": [
      {
        "id": "example",
        "logoUrl": "example",
        "name": "example",
        "partnership": {
          "status": "example",
          "statusUpdatedAt": "example"
        },
        "type": "example"
      }
    ],
    "total": 1
  }
}
```

### List transaction queries

List the queries a publisher account raised about missing or wrong commission, in a period of up to 31 days.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- From (`start_date`, date and time, required): The start of the period. The period can be at most 31 days long.
- To (`end_date`, date and time, required): The end of the period.
- Date to filter on (`date_type`, text): Which date the period applies to. Leave empty for the date of the sale. One of: `transactionDate` (Date of the sale), `enquiryDate` (Date the query was raised), `validationDate` (Date the query was approved or declined).
- Status (`statuses`, list): Only queries in these statuses. Leave empty for all. One or more of: `PENDING`, `APPROVED`, `DECLINED`.
- Advertisers (`advertiser_ids`, list): Only these advertisers. Leave empty for all of them.
- Sort by (`sort`, text): The order of the list. Leave empty for Awin's default. One of: `-transactionDate` (Newest sale first), `transactionDate` (Oldest sale first), `-enquiryDate` (Newest query first), `enquiryDate` (Oldest query first).
- Limit (`limit`, number): How many to return, up to 100. Leave empty for 25. From 1 to 100.
- Next page token (`page_token`, text): The next page token from an earlier result, to read the next page.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "nextPageToken": "example",
    "results": [
      {
        "advertiserId": "example",
        "clickRef": "example",
        "commission": {
          "amount": "example",
          "currency": "example"
        },
        "declineReason": "example",
        "description": "example",
        "enquiryDate": "example",
        "enquiryId": "example",
        "id": "example",
        "orderRef": "example",
        "publisherId": "example",
        "saleAmount": {
          "amount": "example",
          "currency": "example"
        },
        "status": "example",
        "transactionDate": "example",
        "transactionId": "example",
        "type": "example",
        "validationDate": "example"
      }
    ]
  }
}
```

### List transactions

List a publisher account's sales and leads in a period of up to 31 days, with their commission and status.

**Inputs**

- Publisher account (`publisher_account_id`, text, required): Your Awin publisher account.
- From (`start_date`, date and time, required): The start of the period. The period can be at most 31 days long.
- To (`end_date`, date and time, required): The end of the period.
- Date to filter on (`date_type`, text): Which date the period applies to. Leave empty for the date of the sale. One of: `transaction` (Date of the sale), `validation` (Date it was approved or declined), `amendment` (Date it was amended).
- Status (`status`, text): Only transactions with this status. Leave empty for all. One of: `pending`, `approved`, `declined`, `deleted`.
- Advertisers (`advertiser_ids`, list): Only these advertisers. Leave empty for all of them.
- Include basket products (`show_basket_products`, true/false): Also return the products in each order, where the advertiser shares them.

**Outputs**

- `data` (list): The response from Awin.

**Example output**

```json
{
  "data": [
    {
      "advertiserCountry": "example",
      "advertiserId": 1,
      "amendReason": "example",
      "amended": true,
      "clickDate": "example",
      "clickDevice": "example",
      "clickRefs": {
        "clickRef": "example"
      },
      "commissionAmount": {
        "amount": 1,
        "currency": "example"
      },
      "commissionStatus": "example",
      "customerCountry": "example",
      "declineReason": "example",
      "id": 1,
      "lapseTime": 1,
      "orderRef": "example",
      "paidToPublisher": true,
      "paymentId": 1,
      "publisherId": 1,
      "saleAmount": {
        "amount": 1,
        "currency": "example"
      },
      "siteName": "example",
      "transactionDate": "example",
      "transactionDevice": "example",
      "transactionParts": [
        {
          "amount": 1,
          "commissionAmount": 1,
          "commissionGroupCode": "example",
          "commissionGroupId": 1,
          "commissionGroupName": "example"
        }
      ],
      "type": "example",
      "url": "example",
      "validationDate": "example",
      "voucherCode": "example",
      "voucherCodeUsed": true
    }
  ]
}
```

### Reject publisher application

Reject a publisher's application to join your programme. Awin emails them your reason.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Publisher (`publisher_id`, text, required): The publisher whose application to reject.
- Reason (`reason`, text, required): Why the application is rejected, in your own words.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {}
}
```

### Send conversion

Report a sale or lead to Awin from your server (the Conversion API), so the publisher who referred it is credited.

**Inputs**

- Advertiser account (`advertiser_account_id`, text, required): Your Awin advertiser account (your programme).
- Order reference (`order_reference`, text, required): Your order or booking reference (up to 50 characters).
- Amount (`amount`, number, required): The order's value after discounts, before tax and delivery. For a lead, the number of leads. At least 0.
- Currency (`currency`, text, required): The order's currency. One of: `GBP`, `EUR`, `USD`, `AUD`, `BRL`, `CAD`, `CHF`, `CNY`, `DKK`, `JPY`, and 6 more.
- Awin click ID (awc) (`awc`, text): The Awin click ID (the awc value Awin adds to your landing page's address).
- Voucher code (`voucher_code`, text): The voucher code used, to credit the publisher it belongs to.
- Publisher (`publisher_id`, text): The publisher who referred the order, when there's no click ID. Needs the click time.
- Click time (`click_time`, date and time): When the visitor clicked the publisher's link. Needed with the publisher.
- Commission group code (`commission_group`, text): The commission group code the order belongs to. Leave empty for DEFAULT.
- Customer (`customer_type`, text): Whether the customer is new or returning. One of: `NEW` (New customer), `RETURNING` (Returning customer).
- Click reference (`click_ref`, text): A click reference to record with the order.
- Test only (`test`, true/false): Send as a test: Awin checks the order but doesn't track it.

**Outputs**

- `data` (object): The response from Awin.

**Example output**

```json
{
  "data": {
    "batchId": "example",
    "failedOrders": [
      {}
    ],
    "message": "example",
    "successfulOrders": [
      {}
    ]
  }
}
```
