Vendor

Learn how to use the Vendor resource with Metaprise Billing.

Overview

The Vendor object represents an individual or company that sells goods or services to your Organization.


Before you begin

Sign up the Metaprise developer devhub platform to get your unique Client ID and API key.
Obtain your access token by authenticating to Metaprise using your unique Client ID and API key. You will need the access token to make API calls.
Set up webhooks to receive notifications on Global Account events.


Vendor operations


Vendor ProfileDescription
Vendor BasicsCompany Name
Contact First Name
Contact Last Name
Vendor Type
Primary Contact Email
Vendor addressCountry
Address Line1 & Address Line2
City
State/Province
Zip/Postal code
Phone
Payment DetailsCurrency
Payment method
Account Name
Account Number
Additional InformationTax ID
Tax ID 2
1099 Vendor
Fax

Create a Vendor

  1. Use dashboard to create a new customer.

    1. Sign up and log in the Metaprise dashboard

    2. Click 'Add Vendor' button.

    3. Fill vendor information required in vendor operation.

    4. You can Edit one existing vendor.

    5. You can also Active/Inactive one existing vendor by clicking the 'Active' or 'Inactive' right top button.

  2. Use API to create a vendor

    1. The following example shows how to create a new vendor with minimal vendor profile. See create a vendorfor a full list of arguments you can pass to the API.
      1. Example Request
        curl https://api.metaprise.com/v1/vendors \
          -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \
          --data-urlencode email="[email protected]" \
          -d payment_method=pm_card_visa \
          -d "bill_settings[default_payment_method]"=pm_card_visa
        
      2. Example Response
        {
            "result": "success",
            "data": {
                "uid": "12217",
                "bid": "1020221",
                "company_name": "Fantastic Juicy",
                "first_name": "Alex",
                "last_name": "Yang",
                "vendor_type": "business",
                "vendor_uid": "12234",
                "vendor_bid": "1020345",
                "vendor_is_regidter": "true",
                "vendor_is_st_bank_account": "true",
                "contact_email": "[email protected]",
                "address_1": "Queen street",
                "address_2": " ",
                "address_3": " ",
                "address_4": " ",
                "country": "United States",
                "city": "New York",
                "state": "New York",
                "zipcode": "10002",
                "pay_to_name":"Alex Yang",
                "notify_email":"[email protected]",
                "phone": "+1,3343343344",
                "tax_id":"1234",
                "is_1099_vendor":"true",
                "fax": "+1,3343343344",
                "quickbook_sync": "true",
                "payment_details_bank_type": "",
                "payment_details":"",
                "is_delete": "true",
                "created_at": "2015-10-06T10:50:42-07:00",
                "updated_at": "2015-10-06T10:50:42-07:00",
                "status": "active",  
                "source": "Metaprise", 
                "quickbook_id": "", 
                
            }
        }
        

Retrieve a vendor details

Call Retrieve a vendor by specifying vendor ID in the endpoint URL.

Example request

curl --request GET  
--url '<https://api-demo.metaprise.com/api/v1/global_accounts/>\<your_global_account_id>'  
--header 'Authorization: Bearer \<your_bearer_token>'

Example response

{
    "result": "success",
    "data": {
        "uid": "12217",
        "bid": "1020221",
        "company_name": "Fantastic Juicy",
        "first_name": "Alex",
        "last_name": "Yang",
        "vendor_type": "business",
        "vendor_uid": "12234",
        "vendor_bid": "1020345",
        "vendor_is_regidter": "true",
        "vendor_is_st_bank_account": "true",
        "contact_email": "[email protected]",
        "address_1": "Queen street",
        "address_2": " ",
        "address_3": " ",
        "address_4": " ",
        "country": "United States",
        "city": "New York",
        "state": "New York",
        "zipcode": "10002",
        "pay_to_name":"Alex Yang",
        "notify_email":"[email protected]",
        "phone": "+1,3343343344",
        "tax_id":"1234",
        "is_1099_vendor":"true",
        "fax": "+1,3343343344",
        "quickbook_sync": "true",
        "payment_details_bank_type": "",
        "payment_details":"",
        "is_delete": "true",
        "created_at": "2015-10-06T10:50:42-07:00",
        "updated_at": "2015-10-06T10:50:42-07:00",
        "status": "active",  
        "source": "Metaprise", 
        "quickbook_id": "", 
        
    }
}