Skip to main content

Update a Publisher

PATCH 

https://api.tripleup.dev/partner/publishers/:id

Updates a Publisher.

Currently, only the Publisher name and address may be updated.

Request

Path Parameters

    id EntityIdrequired

    Possible values: non-empty and <= 100 characters

Body

    address object

    A physical address in the world. triple uses address validation services to update and standardize addresses on our platform. Address data sent to the API may be updated as we process, validate, and normalize addresses. NOTE: Though not marked as required, the street address, postal code, and country code are required for transaction matching to function properly.

    citystring

    Municipality or city name

    Possible values: non-empty and <= 100 characters

    Example: PITTSBURGH
    country_codeCountryCode (string)

    2-letter ISO-3166 country code

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^[A-Z]{2}$

    Example: US
    country_subdivision_codestring

    ISO-3166-2; 2-6 letter code for a country subdivision

    Possible values: >= 2 characters and <= 6 characters

    Example: PA
    latitudedouble

    The latitude of caller. The value is a string but can be parsed as a double precision floating point number.

    Possible values: Value must match regular expression ^-?([0-8]?[0-9]|90)(\.[0-9]{1,6})$

    Example: 40.440624
    longitudedouble

    The longitude of caller. The value is a string but can be parsed as a double precision floating point number.

    Possible values: Value must match regular expression ^-?([0-9]\.?\d{6}|[1-9][0-9]\.?\d{6}|[1][1-7][1-9]\.?\d{6}|[1][1-8][0]\.?\d{6})?$

    Example: -79.995888
    postal_codePostalCode (string)

    ZIP Code™, ZIP+4, or postal code

    Possible values: non-empty and <= 15 characters

    Example: 15206
    street_addressstring

    Single or multi-line physical address

    Possible values: >= 2 characters and <= 500 characters

    Example: 7370 BAKER ST, STE 100
    assumed_namePublisherAssumedName (string)

    Assumed legal name of the Publisher

    Possible values: non-empty and <= 100 characters, Value must match regular expression ^(?!\s).+(?<!\s)$

Responses

Publisher

Schema
    address objectrequired

    A physical address in the world. triple uses address validation services to update and standardize addresses on our platform. Address data sent to the API may be updated as we process, validate, and normalize addresses. NOTE: Though not marked as required, the street address, postal code, and country code are required for transaction matching to function properly.

    citystring

    Municipality or city name

    Possible values: non-empty and <= 100 characters

    Example: PITTSBURGH
    country_codeCountryCode (string)

    2-letter ISO-3166 country code

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^[A-Z]{2}$

    Example: US
    country_subdivision_codestring

    ISO-3166-2; 2-6 letter code for a country subdivision

    Possible values: >= 2 characters and <= 6 characters

    Example: PA
    latitudedouble

    The latitude of caller. The value is a string but can be parsed as a double precision floating point number.

    Possible values: Value must match regular expression ^-?([0-8]?[0-9]|90)(\.[0-9]{1,6})$

    Example: 40.440624
    longitudedouble

    The longitude of caller. The value is a string but can be parsed as a double precision floating point number.

    Possible values: Value must match regular expression ^-?([0-9]\.?\d{6}|[1-9][0-9]\.?\d{6}|[1][1-7][1-9]\.?\d{6}|[1][1-8][0]\.?\d{6})?$

    Example: -79.995888
    postal_codePostalCode (string)

    ZIP Code™, ZIP+4, or postal code

    Possible values: non-empty and <= 15 characters

    Example: 15206
    street_addressstring

    Single or multi-line physical address

    Possible values: >= 2 characters and <= 500 characters

    Example: 7370 BAKER ST, STE 100
    assumed_namePublisherAssumedName (string)required

    Assumed legal name of the Publisher

    Possible values: non-empty and <= 100 characters, Value must match regular expression ^(?!\s).+(?<!\s)$

    created_atdate-timerequired

    RFC 3339 date time used for creation and mod times

    Example: 2021-12-01T01:59:59.000Z
    external_idPublisher External ID (string)

    Partner-provided, external ID for a Publisher.

    External IDs should be stable and never sensitive.

    External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Publisher within the scope of its parent Portfolio Manager.

    To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).

    Possible values: non-empty and <= 255 characters, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)

    Example: id-for-entity
    idEntityId (string)required

    The triple-defined ID for the entity.

    Possible values: non-empty and <= 100 characters

    Example: triple-abc-123
    portfolio_manager_idEntityId (string)

    The triple-defined ID for the entity.

    Possible values: non-empty and <= 100 characters

    Example: triple-abc-123
    revenue_sharedouble

    The percent-based revenue share of this Publisher.

    Only Portfolio Managers may set this value for their Publishers. If set, this will override the value set at the Portfolio Manager level. The value is a string but can be parsed as a double precision floating point number.

    Possible values: >= 0 and <= 100

    Example: 1.125
    updated_atdate-timerequired

    RFC 3339 date time used for creation and mod times

    Example: 2021-12-01T01:59:59.000Z

Authorization: oauth2

name: triple_authtype: oauth2scopes: api.tripleup.com/partner.publishersdescription: The triple API uses OAuth2 with a client id and client secret.
The URL to get an OAuth2 token is here:
https://auth.tripleup.dev/oauth2/token
This is an example of how to call the API from the command line.
Code will need to be developed by the partner in their servers.
```bash
# Fetch an access token
TOKEN_URL=https://auth.tripleup.dev/oauth2/token
CLIENT_ID=fake
CLIENT_SECRET=another-fake
# Fetch a space-separated list of scopes
# If not provided, will return an access token
# with all scopes to which the client has access
SCOPE=api.tripleup.com/partner.publishers
TOKEN_RESPONSE=$(curl -s -X POST $TOKEN_URL \
  --user $CLIENT_ID:$CLIENT_SECRET \
  --data grant_type=client_credentials \
  --data-urlencode "scope=$SCOPE")
# Use an access token
ACCESS_TOKEN=$(echo $TOKEN_RESPONSE | jq -r '.access_token')
TOKEN_TYPE=$(echo $TOKEN_RESPONSE | jq -r '.token_type')
API_URL=https://api.tripleup.dev
curl -X GET "$API_URL/partner/publishers" \
  --header "Authorization: $TOKEN_TYPE $ACCESS_TOKEN"
```
See the _Client credentials grant_ section at the bottom of this
[AWS blog post](https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/)
for more information.
flows: {
  "clientCredentials": {
    "tokenUrl": "https://auth.tripleup.dev/oauth2/token",
    "scopes": {
      "api.tripleup.com/partner.portfolios": "Manage Portfolio Manager details and portfolios of Publishers\n",
      "api.tripleup.com/partner.publishers": "Manage Publisher details, Card Programs, Consumers, Card Accounts,\nand Transactions\n",
      "api.tripleup.com/partner.view_offers": "View recommended Offers, search Offers, and view Offer details\n",
      "api.tripleup.com/partner.content_providers": "Manage Content Provider details, Merchants, Merchant Locations,\nand Offers\n"
    }
  }
}
import http.client
import json

conn = http.client.HTTPSConnection("api.tripleup.dev")
payload = json.dumps({
"address": {
"city": "PITTSBURGH",
"country_code": "US",
"country_subdivision_code": "PA",
"latitude": "40.440624",
"longitude": "-79.995888",
"postal_code": "15206",
"street_address": "7370 BAKER ST, STE 100\n"
},
"assumed_name": "string"
})
headers = {
'Content-Type': 'application/merge-patch+json',
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("PATCH", "/partner/publishers/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://api.tripleup.dev
Auth
Parameters
— pathrequired
Body
{
  "address": {
    "city": "PITTSBURGH",
    "country_code": "US",
    "country_subdivision_code": "PA",
    "latitude": "40.440624",
    "longitude": "-79.995888",
    "postal_code": "15206",
    "street_address": "7370 BAKER ST, STE 100\n"
  },
  "assumed_name": "string"
}