# Procurify

> Create requisitions, vendors, users and account codes, close and receive purchase orders, mark bills paid, and follow requisitions, purchase orders, bills and payments in Procurify.

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

## Actions

### Close purchase order

Close a purchase order so nothing more is received or billed against it.

**Inputs**

- Purchase order (`purchase_order_id`, number, required): The purchase order, by its Procurify PO number. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "PO_Num": "example",
    "date": "example",
    "fulfilment_status": "example",
    "id": 1,
    "item_count": 1,
    "last_modified": "example",
    "number": "example",
    "pref_vendor": {
      "id": 1,
      "name": "example"
    },
    "procurify_PO": 1,
    "purchaser": {
      "email": "example",
      "firstName": "example",
      "id": 1,
      "lastName": "example"
    },
    "state": 1,
    "state_name": "example",
    "total": "example",
    "uuid": "example",
    "version": 1
  }
}
```

### Create account code

Add an account code (GL code), optionally under a parent code and open to some departments.

**Inputs**

- Code (`code`, text, required): The code, such as 6100.
- Description (`description`, text, required): What the code is for, such as Office supplies.
- Account type (`account_type`, text): The kind of account. Leave empty for Procurify's default. One of: `assets`, `liability`, `expense`, `income`, `equity`, `other`.
- Parent code (`parent_id`, number): The code this one sits under. At least 1.
- Departments (`department_ids`, list): The departments that can charge to this code.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "account_type": 1,
    "active": true,
    "applied_accounts_count": 1,
    "code": "example",
    "description": "example",
    "id": 1,
    "parent": 1
  }
}
```

### Create requisition

Submit a purchase request for one item, for approval, as the connected user.

**Inputs**

- Location (`location_name`, text, required): The location the request is for.
- Department (`department_name`, text, required): The department the request is for.
- Needed by (`required_date`, date, required): When the item is needed.
- Item (`item_name`, text, required): What to buy.
- Vendor (`vendor_name`, text, required): Who to buy it from.
- Account code (`account_code`, text, required): The account code to charge.
- Quantity (`quantity`, number, required): How many.
- Unit (`unit`, text, required): The unit, such as Each or Box.
- Unit price (`unit_price`, number, required): The price of one unit. At least 0.
- Currency (`currency_code`, text, required): The currency of the price.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "uuid": "example"
  }
}
```

### Create user

Add a user to Procurify, with a role and their home location and department, and invite them by email.

**Inputs**

- Email (`email`, text, required): The user's email address.
- First name (`first_name`, text): The user's first name.
- Last name (`last_name`, text): The user's last name.
- Position (`position`, text): The user's job title.
- Phone (`phone`, text): The user's phone number.
- Role (`role_id`, number): The user's role, which sets what they can do. At least 1.
- Home location (`home_location_id`, number): The user's home location. They can request for it. At least 1.
- Home department (`home_department_id`, number): The user's home department in that location. Leave empty to let them request for every department there. At least 1.
- All locations (`all_locations`, true/false): On lets the user request for every location and department.
- Send invitation (`send_invitation_email`, true/false): On emails the user an invitation to sign in. Leave empty to send it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "department": {
      "id": 1,
      "location": {
        "id": 1,
        "name": "example"
      },
      "name": "example"
    },
    "email": "example",
    "firstName": "example",
    "id": 1,
    "is_active": true,
    "lastName": "example",
    "location": {
      "id": 1,
      "name": "example"
    },
    "phone": "example",
    "position": "example",
    "role": {
      "id": 1,
      "name": "example",
      "type": 1
    },
    "user": 1,
    "user_tier": "example"
  }
}
```

### Create vendor

Add a vendor with its contact details.

**Inputs**

- Name (`name`, text, required): The vendor's name.
- Type (`vendor_type`, text): Preferred vendors show when people request items; regular ones only to purchasers and accounts payable. Leave empty for preferred. One of: `preferred`, `regular`, `credit_card_provider` (Credit card provider).
- Email (`email`, text): The vendor's email address.
- Email purchase orders (`email_purchase_orders`, true/false): On emails each purchase order to the vendor's email address automatically.
- Contact (`contact`, text): The person to contact at the vendor.
- Phone (`phone`, text): The vendor's phone number.
- Address line 1 (`address_line_1`, text): The first address line.
- Address line 2 (`address_line_2`, text): The second address line.
- City (`city`, text): The city.
- State or province (`state`, text): The state or province.
- Postal code (`postal_code`, text): The ZIP or postal code.
- Country (`country`, text): The country.
- Website (`website`, text): The vendor's website.
- External ID (`external_id`, text): The vendor's ID in your accounting system.
- Account number (`account_number`, text): Your account number with the vendor.
- Currency (`currency_id`, number): The currency the vendor bills in. At least 1.
- 1099 eligible (`is_1099_eligible`, true/false): On marks the vendor as needing a US 1099 tax form.
- Notes (`comments`, text): Notes about the vendor.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "account_number_with_vendor": "example",
    "active": true,
    "addressLineOne": "example",
    "addressLineTwo": "example",
    "city": "example",
    "comments": "example",
    "contact": "example",
    "country": "example",
    "currency": 1,
    "dateModified": "example",
    "email": [
      "example"
    ],
    "external_id": "example",
    "fax": "example",
    "id": 1,
    "is_1099_eligible": true,
    "name": "example",
    "payment_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "payment_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "phoneOne": "example",
    "phoneTwo": "example",
    "postalCode": "example",
    "shipping_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "shipping_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "state_province": "example",
    "type": 1,
    "url": "example"
  }
}
```

### Deactivate user

Deactivate a user so they can no longer sign in. Their history stays.

**Inputs**

- User (`procurify_user_id`, number, required): The user to deactivate. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deactivated": true,
    "id": 1
  }
}
```

### Get bill

Get a bill with its line items, tax and the purchase orders it bills.

**Inputs**

- Bill (`bill_id`, text, required): The bill.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "creator": {
      "email": "example",
      "firstName": "example",
      "id": 1,
      "lastName": "example"
    },
    "currency": {
      "id": 1,
      "name": "example",
      "rate": "example"
    },
    "due_date": "example",
    "gl_post_date": "example",
    "id": 1,
    "invoice_date": "example",
    "invoice_number": "example",
    "items": [
      {
        "description": "example",
        "id": 1,
        "po": {
          "id": 1,
          "number": "example",
          "uuid": "example"
        },
        "quantity": "example",
        "sku": "example",
        "tax_amount": 1,
        "total_cost": 1,
        "total_cost_with_tax": 1,
        "unit": "example",
        "unit_cost": 1
      }
    ],
    "last_modified_datetime": "example",
    "locked": true,
    "note": "example",
    "payment_terms": "example",
    "shipping_amount": 1,
    "status": 1,
    "status_name": "example",
    "submitted_date": "example",
    "subtotal_cost": 1,
    "tax_amount": 1,
    "total_cost": 1,
    "total_cost_with_tax": 1,
    "type": 1,
    "uuid": "example",
    "vendor": {
      "id": 1,
      "name": "example"
    },
    "vendor_name": "example",
    "version": 1
  }
}
```

### Get connected user

Get the Procurify user that's connected, with their department and location.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "department": {
      "branch": {
        "id": 1,
        "name": "example"
      },
      "id": 1,
      "name": "example"
    },
    "email": "example",
    "firstName": "example",
    "id": 1,
    "is_active": true,
    "lastName": "example",
    "phone": "example",
    "position": "example",
    "role": 1,
    "updated_at": "example",
    "user": 1,
    "user_tier": "example",
    "uuid": "example"
  }
}
```

### Get purchase order

Get a purchase order with its line items and what's been received.

**Inputs**

- Purchase order (`purchase_order_id`, number, required): The purchase order, by its Procurify PO number. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "PO_Num": "example",
    "active": true,
    "closed_date": "example",
    "comment": "example",
    "date": "example",
    "freight": "example",
    "fulfilment_status": "example",
    "item_count": 1,
    "last_modified": "example",
    "number": "example",
    "order_items": [
      {
        "accountCode": "example",
        "id": 1,
        "last_modified": "example",
        "lineComment": "example",
        "name": "example",
        "num": "example",
        "orderNum": 1,
        "po_note": "example",
        "price": "example",
        "quantity": 1,
        "receivedFailQty": 1,
        "receivedPassQty": 1,
        "sku": "example",
        "status": 1,
        "total_cost": "example",
        "unit": "example"
      }
    ],
    "other": "example",
    "payment_terms": "example",
    "pref_vendor": {
      "id": 1,
      "name": "example"
    },
    "procurify_PO": 1,
    "promise_date": "example",
    "purchased_currency": {
      "id": 1,
      "name": "example",
      "rate": "example"
    },
    "purchaser": {
      "email": "example",
      "firstName": "example",
      "id": 1,
      "lastName": "example"
    },
    "shipping_terms": "example",
    "state": 1,
    "state_name": "example",
    "subtotal": "example",
    "total": "example",
    "uuid": "example",
    "vendor_contact": "example",
    "vendor_name": "example",
    "version": 1
  }
}
```

### Get vendor

Get a vendor with its contact details, terms and currency.

**Inputs**

- Vendor (`vendor_id`, number, required): The vendor. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "account_number_with_vendor": "example",
    "active": true,
    "addressLineOne": "example",
    "addressLineTwo": "example",
    "city": "example",
    "comments": "example",
    "contact": "example",
    "country": "example",
    "currency": 1,
    "dateModified": "example",
    "email": [
      "example"
    ],
    "external_id": "example",
    "fax": "example",
    "id": 1,
    "is_1099_eligible": true,
    "name": "example",
    "payment_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "payment_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "phoneOne": "example",
    "phoneTwo": "example",
    "postalCode": "example",
    "shipping_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "shipping_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "state_province": "example",
    "type": 1,
    "url": "example"
  }
}
```

### List account codes

List the account codes (GL codes) spending is charged to.

**Inputs**

- Search (`search`, text): Only records matching this text.
- Code (`code`, text): Only the account code that is exactly this.
- Status (`status`, text): Only active or only inactive records. Leave empty for both. One of: `active`, `inactive`.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "account_type": 1,
        "active": true,
        "applied_accounts_count": 1,
        "code": "example",
        "description": "example",
        "id": 1,
        "parent": 1
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List bills

List bills (vendor invoices) with their status, vendor, dates and total.

**Inputs**

- Status (`bill_status`, text): Only bills with this status. Leave empty for every status. One of: `all`, `all_active` (All active), `draft`, `pending_approval` (Pending approval), `approved`, `denied`, `paid`, `withdrawn`, `archived`.
- Vendor (`vendor_id`, number): Only this vendor's bills. At least 1.
- Invoice date from (`invoice_from`, date): Only records invoiced on or after this day.
- Invoice date until (`invoice_to`, date): Only records invoiced on or before this day.
- Due by (`due_by`, date): Only records due on or before this day.
- Changed after (`changed_after`, date and time): Only bills changed at or after this time.
- Search (`search`, text): Only records matching this text.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "creator": {
          "email": "example",
          "firstName": "example",
          "id": 1,
          "lastName": "example"
        },
        "currency": {
          "id": 1,
          "name": "example",
          "rate": "example"
        },
        "due_date": "example",
        "gl_post_date": "example",
        "id": 1,
        "invoice_date": "example",
        "invoice_number": "example",
        "last_modified_datetime": "example",
        "locked": true,
        "past_due": true,
        "status": 1,
        "status_name": "example",
        "submitted_date": "example",
        "total_cost_with_tax": 1,
        "type": 1,
        "uuid": "example",
        "vendor": {
          "id": 1,
          "name": "example"
        },
        "version": 1
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List budgets

List budgets by department and account code, with what's approved, spent and left.

**Inputs**

- Department (`department_id`, number): Only this department. At least 1.
- Account code (`account_code_id`, number): Only budgets on this account code. At least 1.
- Current budgets only (`current_only`, true/false): On lists only budgets whose period includes today.
- Status (`status`, text): Only active or only inactive records. Leave empty for both. One of: `active`, `inactive`.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "account_code": {
          "code": "example",
          "description": "example",
          "id": 1
        },
        "active": true,
        "balance_approved": "example",
        "balance_purchased": "example",
        "budget": "example",
        "budget_used_approved": "example",
        "budget_used_purchased": "example",
        "department": {
          "branch": {
            "id": 1,
            "name": "example"
          },
          "id": 1,
          "name": "example"
        },
        "end_datetime": "example",
        "id": 1,
        "start_datetime": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List catalog items

List the items in your catalog, with their vendor, price and account code.

**Inputs**

- Search (`search`, text): Only records matching this text.
- Vendor (`vendor_id`, number): Only this vendor. At least 1.
- SKU (`sku`, text): Only the item with this SKU.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "account_code": {
          "code": "example",
          "description": "example",
          "id": 1
        },
        "currency": {
          "id": 1,
          "name": "example"
        },
        "description": "example",
        "id": 1,
        "image": "example",
        "internalSKU": "example",
        "last_requested_date": "example",
        "name": "example",
        "pref_vendor": {
          "id": 1,
          "name": "example"
        },
        "price": "example",
        "product_url": "example",
        "requested_count": 1,
        "unitType": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List departments

List departments, optionally only one location's.

**Inputs**

- Location (`location_id`, number): Only this location. At least 1.
- Search (`search`, text): Only records matching this text.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "active": true,
        "branch": {
          "headquarter": true,
          "id": 1,
          "name": "example"
        },
        "external_id": "example",
        "id": 1,
        "name": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List locations

List the locations (branches) with their currency and addresses.

**Inputs**

- Search (`search`, text): Only records matching this text.
- Status (`status`, text): Only active or only inactive records. Leave empty for both. One of: `active`, `inactive`.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "active": true,
        "currency": {
          "base": true,
          "description": "example",
          "id": 1,
          "name": "example",
          "rate": "example"
        },
        "department_count": 1,
        "email": "example",
        "external_id": "example",
        "headquarter": true,
        "id": 1,
        "name": "example",
        "phoneOne": "example",
        "primary_billing_address": {
          "addressLineOne": "example",
          "city": "example",
          "country": "example",
          "name": "example",
          "postalCode": "example",
          "state_province": "example"
        },
        "primary_shipping_address": {
          "addressLineOne": "example",
          "city": "example",
          "country": "example",
          "name": "example",
          "postalCode": "example",
          "state_province": "example"
        },
        "url": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List payments

List payments to vendors, newest first, with their status and amount.

**Inputs**

- Statuses (`payment_statuses`, list): Only payments with one of these statuses. Leave empty for every status. One or more of: `draft`, `pending_approval` (Pending approval), `approved`, `denied`, `processing`, `scheduled`, `paid`, `failed`.
- Vendor (`vendor_id`, number): Only this vendor. At least 1.
- Created after (`created_after`, date and time): Only payments created at or after this time.
- Created before (`created_before`, date and time): Only payments created at or before this time.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "amount": "example",
        "bill_groups": [
          1
        ],
        "created_at": "example",
        "creator": {
          "email": "example",
          "first_name": "example",
          "last_name": "example"
        },
        "currency": {
          "id": 1,
          "name": "example"
        },
        "id": 1,
        "payment_source_name": "example",
        "payment_source_type": "example",
        "posted_date": "example",
        "processing_date": "example",
        "status": "example",
        "updated_at": "example",
        "uuid": "example",
        "vendor_name": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List purchase orders

List purchase orders with their status, vendor and totals.

**Inputs**

- Show (`role`, text): Purchase orders you placed, or ones waiting for you to receive. Leave empty for the ones you placed. One of: `purchased_orders` (Purchased orders), `orders_to_receive` (Orders to receive).
- Status (`po_status`, text): Only purchase orders with this status. Leave empty for every status. One of: `all`, `open`, `partially_received` (Partially received), `closed`, `paid`, `cancelled`.
- Vendor (`vendor_id`, number): Only this vendor. At least 1.
- Created from (`created_from`, date): Only records created on or after this day.
- Created until (`created_to`, date): Only records created on or before this day.
- Changed from (`changed_from`, date): Only records changed on or after this day.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "PO_Num": "example",
        "active": true,
        "closed_date": "example",
        "comment": "example",
        "date": "example",
        "freight": "example",
        "fulfilment_status": "example",
        "item_count": 1,
        "last_modified": "example",
        "number": "example",
        "other": "example",
        "payment_terms": "example",
        "pref_vendor": {
          "id": 1,
          "name": "example"
        },
        "procurify_PO": 1,
        "promise_date": "example",
        "purchased_currency": {
          "id": 1,
          "name": "example",
          "rate": "example"
        },
        "purchaser": {
          "email": "example",
          "firstName": "example",
          "id": 1,
          "lastName": "example"
        },
        "shipping_terms": "example",
        "state": 1,
        "state_name": "example",
        "subtotal": "example",
        "total": "example",
        "uuid": "example",
        "vendor_contact": "example",
        "vendor_name": "example",
        "version": 1
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List requisitions

List purchase requests (orders), with their status, requester and totals.

**Inputs**

- Status (`requisition_status`, text): Only requisitions with this status. Leave empty for every status. One of: `pending`, `approved`, `denied`, `purchased`, `received`, `draft`, `cancelled`.
- Location (`location_id`, number): Only this location. At least 1.
- Department (`department_id`, number): Only this department. At least 1.
- Submitted from (`created_from`, date): Only records submitted on or after this day.
- Submitted until (`created_to`, date): Only records submitted on or before this day.
- Changed from (`changed_from`, date): Only records changed on or after this day.
- Search (`search`, text): Only records matching this text.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "branch": {
          "external_id": "example",
          "id": 1,
          "name": "example"
        },
        "currency": {
          "base": true,
          "id": 1,
          "name": "example",
          "rate": "example"
        },
        "date": "example",
        "dateModified": "example",
        "dateRequired": "example",
        "denial_comment": "example",
        "department": {
          "active": true,
          "external_id": "example",
          "id": 1,
          "name": "example"
        },
        "description": "example",
        "item_count": 1,
        "lineCount": 1,
        "num": 1,
        "order_number": 1,
        "purchasedCount": 1,
        "status": 1,
        "status_name": "example",
        "totalPrice": "example",
        "total_cost_in_base_currency": 1,
        "user": {
          "email": "example",
          "firstName": "example",
          "id": 1,
          "lastName": "example"
        },
        "uuid": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List users

List users, optionally only active ones, one location's or one role's.

**Inputs**

- Search (`search`, text): Only records matching this text.
- Status (`user_status`, text): Only active or only deactivated users. Leave empty for both. One of: `active`, `inactive`.
- Location (`location_id`, number): Only this location. At least 1.
- Role (`role_id`, number): Only users with this role. At least 1.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "department": {
          "id": 1,
          "location": {
            "id": 1,
            "name": "example"
          },
          "name": "example"
        },
        "email": "example",
        "firstName": "example",
        "id": 1,
        "is_active": true,
        "lastName": "example",
        "location": {
          "id": 1,
          "name": "example"
        },
        "phone": "example",
        "position": "example",
        "role": {
          "id": 1,
          "name": "example",
          "type": 1
        },
        "user": 1,
        "user_tier": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### List vendors

List active vendors, optionally only one type or a search.

**Inputs**

- Search (`search`, text): Only records matching this text.
- Type (`vendor_type`, text): Only vendors of this type. One of: `preferred`, `regular`, `credit_card_provider` (Credit card provider).
- External ID (`external_id`, text): Only the vendor with this external ID.
- Records per page (`per_page`, number): How many records a page holds. Leave empty for 50. From 1 to 1000.
- Page (`page`, number): Which page to return, from 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "has_more": true,
    "items": [
      {
        "account_number_with_vendor": "example",
        "active": true,
        "addressLineOne": "example",
        "addressLineTwo": "example",
        "city": "example",
        "comments": "example",
        "contact": "example",
        "country": "example",
        "currency": 1,
        "dateModified": "example",
        "email": [
          "example"
        ],
        "external_id": "example",
        "fax": "example",
        "id": 1,
        "is_1099_eligible": true,
        "name": "example",
        "payment_method_ref": {
          "active": true,
          "description": "example",
          "id": 1,
          "name": "example"
        },
        "payment_term_ref": {
          "active": true,
          "description": "example",
          "id": 1,
          "name": "example"
        },
        "phoneOne": "example",
        "phoneTwo": "example",
        "postalCode": "example",
        "shipping_method_ref": {
          "active": true,
          "description": "example",
          "id": 1,
          "name": "example"
        },
        "shipping_term_ref": {
          "active": true,
          "description": "example",
          "id": 1,
          "name": "example"
        },
        "state_province": "example",
        "type": 1,
        "url": "example"
      }
    ],
    "num_pages": 1,
    "page": 1
  }
}
```

### Mark bills as paid

Mark approved bills that have no payment in Procurify as paid, such as bills paid from your accounting system.

**Inputs**

- Bills (`bill_ids`, list, required): The approved bills to mark as paid.
- Paid on (`payment_date`, date, required): The day they were paid.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "bill_uuids": [
      "example"
    ],
    "payment_date": "example"
  }
}
```

### Receive item

Record items received against a purchase order line: how many passed and how many failed inspection.

**Inputs**

- Item (`order_item_id`, number, required): The purchase order line to receive against. At least 1.
- Received (`passed_quantity`, number, required): How many arrived in good order. At least 0.
- Failed (`failed_quantity`, number): How many arrived damaged or wrong. Leave empty for none. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "created_by": {
      "email": "example",
      "firstName": "example",
      "id": 1,
      "lastName": "example"
    },
    "fail_quantity": "example",
    "id": 1,
    "is_edited": true,
    "order_item": 1,
    "pass_quantity": "example",
    "received_at": "example",
    "total_quantity": "example"
  }
}
```

### Reopen purchase order

Reopen a closed purchase order.

**Inputs**

- Purchase order (`purchase_order_id`, number, required): The purchase order, by its Procurify PO number. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "PO_Num": "example",
    "date": "example",
    "fulfilment_status": "example",
    "id": 1,
    "item_count": 1,
    "last_modified": "example",
    "number": "example",
    "pref_vendor": {
      "id": 1,
      "name": "example"
    },
    "procurify_PO": 1,
    "purchaser": {
      "email": "example",
      "firstName": "example",
      "id": 1,
      "lastName": "example"
    },
    "state": 1,
    "state_name": "example",
    "total": "example",
    "uuid": "example",
    "version": 1
  }
}
```

### Update vendor

Change a vendor's details, or deactivate it. Fields left empty stay as they are.

**Inputs**

- Vendor (`vendor_id`, number, required): The vendor. At least 1.
- Name (`name`, text): The vendor's name.
- Type (`vendor_type`, text): Preferred vendors show when people request items; regular ones only to purchasers and accounts payable. Leave empty for preferred. One of: `preferred`, `regular`, `credit_card_provider` (Credit card provider).
- Email (`email`, text): The vendor's email address.
- Email purchase orders (`email_purchase_orders`, true/false): On emails each purchase order to the vendor's email address automatically.
- Contact (`contact`, text): The person to contact at the vendor.
- Phone (`phone`, text): The vendor's phone number.
- Address line 1 (`address_line_1`, text): The first address line.
- Address line 2 (`address_line_2`, text): The second address line.
- City (`city`, text): The city.
- State or province (`state`, text): The state or province.
- Postal code (`postal_code`, text): The ZIP or postal code.
- Country (`country`, text): The country.
- Website (`website`, text): The vendor's website.
- External ID (`external_id`, text): The vendor's ID in your accounting system.
- Account number (`account_number`, text): Your account number with the vendor.
- Currency (`currency_id`, number): The currency the vendor bills in. At least 1.
- 1099 eligible (`is_1099_eligible`, true/false): On marks the vendor as needing a US 1099 tax form.
- Notes (`comments`, text): Notes about the vendor.
- Active (`active`, true/false): Off deactivates the vendor so it can't be chosen; on activates it again.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "account_number_with_vendor": "example",
    "active": true,
    "addressLineOne": "example",
    "addressLineTwo": "example",
    "city": "example",
    "comments": "example",
    "contact": "example",
    "country": "example",
    "currency": 1,
    "dateModified": "example",
    "email": [
      "example"
    ],
    "external_id": "example",
    "fax": "example",
    "id": 1,
    "is_1099_eligible": true,
    "name": "example",
    "payment_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "payment_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "phoneOne": "example",
    "phoneTwo": "example",
    "postalCode": "example",
    "shipping_method_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "shipping_term_ref": {
      "active": true,
      "description": "example",
      "id": 1,
      "name": "example"
    },
    "state_province": "example",
    "type": 1,
    "url": "example"
  }
}
```
