Weav API (1.0)

Welcome to the Weav API. Use this API to access endpoints delivering real-time data from commerce platforms. Weav is a RESTful API over HTTPS.

Server

URL
https://api.weav.co/v1

Authentication

api_key

Weav uses API keys to enable and control access. Note that your API key can only be used to access information for your connected merchant accounts. To learn more about provisioning merchant accounts, see the Merchant Provisioning guide.

Security Scheme Type API Key
Header parameter name: Authorization

Charge

When a merchant charges a credit card or receives payment through another method, a charge object is created. The charge object contains the purchase date, the amount charged, a description and other metadata from the commerce platform.

List Charges

This endpoint retrieves a list of Charge objects for a specified merchant.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

Query Parameters

created_after
string

Query for charges created after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

updated_after
string

Query for charges updated after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

limit
integer

Number of charges to return.

Default:100
offset
integer

The offset from the most recent object to query from. Will return charges from offset to offset+limit.

Default:0

Responses

200 success
List Charges response
Response Schema
data
array

An array of Charge objects.

offset
integer

The offset of the objects.

Example:

50

total_object
integer

The total number of objects returned.

Example:

42

cURL
Send
curl --request GET \ --url 'https://api.weav.co/v1/merchant/9/charges' \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{}
Was this section helpful?
Yes No

Get Charge

This endpoint retrieves a specific Charge object.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

chargeId
string*

The charge ID to fetch.

Example:

972745

Responses

200 success
Get Charge response
Response Schema
amount
integer

Integral number representing the amount of the charge, returned as the lowest currency type. e.g. cents for USD.

Example:

1000

billingDetails
object

Summary of the customer's billing information (null by default, reach out to us for more information.)

createdOn
string

Date on which the charge was created. All times are in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

currency
string

3-character currency code. e.g. USD, EUR, etc.

Example:

USD

Show More
cURL
Send
curl --request GET \ --url https://api.weav.co/v1/merchant/9/charges/972745 \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{}
Was this section helpful?
Yes No

Health

The merchant health endpoint returns the status of the merchant's Weav integration. Currently, the endpoint contains information such as the vendors the merchant has provisioned with, the last transaction and payout the merchant has made on the platforms and the merchant's account ID on the platform. In the future, Weav plans to maintain a live set of learning models, taking into account various business metrics such as business category, geography, size, revenue growth rate, chargebacks and refund frequency, product variation, and customer churn, among others. Please reach out if you would like to take advantage of this endpoint and provide product input.

Get Merchant Health

This endpoint retrieves a health object for a specified merchant.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

Responses

200 success
Get Merchant Health response
Response Schema
accounts
array

A list of accounts with health information that the merchant has connected

originalName
string

The name included in the name field of the JWT during merchant provisioning.

Example:

test_merchant

cURL
Send
curl --request GET \ --url https://api.weav.co/v1/merchant/9 \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{
  • "accounts": [
    ],
  • "originalName": "test_merchant"
}
Was this section helpful?
Yes No

Payout

A payout object is created when a merchant transfers funds from a commerce platform to a bank account. Every payout consists of multiple transactions which make up the total value of the funds transferred. Therefore, a payout object may be associated with multiple transaction objects (most often charge objects).

  • transactions is a list of all the transactions that are associated with a given payout

List Payouts

This endpoint retrieves a list of Payout objects for a specified merchant.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

Query Parameters

created_after
string

Query for payouts created after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

updated_after
string

Query for payouts updated after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

limit
integer

Number of payouts to return.

Default:100
offset
integer

Offset from most recent object to query from. Will return payouts from offset to offset+limit.

Default:0
Show More

Responses

200 success
List Payouts response
Response Schema
data
array

An array of Payout objects.

offset
integer

The offset of the objects.

Example:

50

total_object
integer

The total number of objects returned.

Example:

42

cURL
Send
curl --request GET \ --url 'https://api.weav.co/v1/merchant/9/payouts' \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{
  • "data": [
    ],
  • "offset": 50,
  • "total_object": 42
}
Was this section helpful?
Yes No

Get Payout

This endpoint retrieves a specific Payout object

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

payoutId
string*

The payout ID to fetch.

Example:

134

Responses

200 success
Get Payout response
Response Schema
amount
integer

Integral number representing the amount of the payout, returned as the lowest currency type. e.g. cents for USD.

Example:

1000

arrivalDate
string

Date on which the payout arrived, or is projected to arrive, in the merchant's bank account. All times are in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

closedAt
string

The time at which the payout was closed and after which it no longer accepts new transactions. We estimate this date per vendor and therefore it may not be accurate, but is an upper bound. Stripe: Determined by when the payout goes from Pending to InTransit or Paid, whichever comes earlier. Shopify: Determined by the issuedAt date for payouts received as InTransit or Paid.

Example:

2020-04-23T15:00:00-04:00

createdOn
string

Date on which the payout was created. All times are in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

Show More
cURL
Send
curl --request GET \ --url https://api.weav.co/v1/merchant/9/payouts/134 \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{
  • "amount": 1000,
  • "arrivalDate": "2020-04-23T15:00:00-04:00",
  • "closedAt": "2020-04-23T15:00:00-04:00",
  • "createdOn": "2020-04-23T15:00:00-04:00",
  • "currency": "USD",
  • "destination": {
    },
  • "gateway": "stripe",
  • "gatewayAccountId": "accnt-12345",
  • "id": 1384,
  • "method": "Standard",
  • "sourceType": "BankAccount",
  • "status": "Paid",
  • "transactionIds": [
    ],
  • "transactions": [
    ],
  • "type": "BankAccount",
  • "updatedAt": "2020-04-23T15:00:00-04:00",
  • "vendorId": "test_payout_123"
}
Was this section helpful?
Yes No

Transaction

The transaction object contains information related to each charge, refund, payout or other transaction that affects a merchant's commerce platform balance. Retrieving all transactions returns a list of every balance-affecting transaction for the time period provided.

  • typeInfo contains all information for the particular transaction type (charge or payout object).
  • payout contains a link to the associated payout object, if the transaction is known to be part of a specific payout. See Payouts for more information on the association of transactions and payouts.

List Transactions

This endpoint retrieves a list of Transaction objects for a specified merchant.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

Query Parameters

created_after
string

Query for transactions created after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

created_before
string

Query for transactions created before this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

updated_after
string

Query for transactions updated after this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

updated_before
string

Query for transactions updated before this date. Must be passed in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

Show More

Responses

200 success
List Transactions response
Response Schema
data
array

An array of Transaction objects.

offset
integer

The offset of the objects.

Example:

50

total_object
integer

The total number of objects returned.

Example:

42

cURL
Send
curl --request GET \ --url 'https://api.weav.co/v1/merchant/9/transactions' \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{
  • "data": [
    ],
  • "offset": 50,
  • "total_object": 42
}
Was this section helpful?
Yes No

Get Transaction

This endpoint retrieves a specific Transaction object.

Path Parameters

merchantId
string*

The merchant ID to fetch data for.

Example:

9

transactionId
string*

The transaction ID to fetch.

Example:

2926

Query Parameters

expand
boolean

Whether or not to expand the associated type object.

Default:true
source_fields
string

A comma separated list of vendor source fields to include in the response field sourceFields.

Example:

?source_fields=type

Responses

200 success
Get Transaction response
Response Schema
amount
integer

Integral number representing the amount of the transaction, returned as the lowest currency type. e.g. cents for USD.

Example:

1000

availableOn
string

Date on which the transaction is available to the merchant. All times are in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

createdOn
string

Date on which the transaction hit the balance. All times are in RFC 3339 format.

Example:

2020-04-23T15:00:00-04:00

currency
string

3-character currency code. e.g. USD, EUR, etc.

Example:

USD

Show More
cURL
Send
curl --request GET \ --url 'https://api.weav.co/v1/merchant/9/transactions/2926' \ --header 'Authorization: Bearer f152fbf5dd7b0e8c770f99a42104739d6c7af5fcb6905454abb68c828318ce23' \ --header 'content-type: application/json'
Response
{
  • "amount": 1000,
  • "availableOn": "2020-04-23T15:00:00-04:00",
  • "createdOn": "2020-04-23T15:00:00-04:00",
  • "currency": "USD",
  • "description": "This is a test transaction.",
  • "fee": 0,
  • "gateway": "stripe",
  • "gatewayAccountId": "accnt-123456",
  • "id": 1324,
  • "netAmount": 1000,
  • "sourceFields": { },
  • "type": "Charge",
  • "typeInfo": { },
  • "updatedAt": "2020-04-23T15:00:00-04:00",
  • "vendorId": "test_transaction_123"
}
Was this section helpful?
Yes No