Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Procurify API Documentation OAUTH API
version: ''
description: '# Disclaimer
- Procurify’s API is evolving and is subject to change at any time.'
servers:
- url: https://{user_domain}.procurify.com
description: Your Procurify domain
variables:
user_domain:
default: your-domain
description: Your procurify domain
tags:
- name: OAuth
paths:
/oauth/token:
post:
servers:
- url: https://<your-domain>.procurify.com
description: Authenticate with oauth
operationId: api_account_code_retrieve
summary: Authenticate with OAuth
description: 'Getting access to Procurify API involves the following three steps:
1. Request credentials for your Procurify account.
2. Request access token using your credentials.
3. Use access token to access Procurify API resources.
#### Request credentials for your Procurify account.
The first step is to request credentials from Procurify. Your role must have access to manage integrations settings in order to request API credentials. You can request API credentials by going to go:
1. Settings in the left navigation bar.
2. Integrations in the Tools section.
3. View button beside API item
This page will allow you to enter an optional description of the application you are developing with the Procurify API and once you are ready, click on “Create Application”. On the next screen, you will be presented with a Client ID and a Client Secret. You will need to copy and save these credentials securely. Please note that the Client Secret is only presented once.
#### Request access token using your credentials.
Once you have the client credentials, you will need to request an access token using these credentials that can be used as a bearer token when making a request to Procurify API. You will need the following information to request an access token:
|Info|Value|
--- | ---
|Token URL:|https://<your-domain>.procurify.com/oauth/token|
|Client ID:|*From the previous step*|
|Client Secret:|*From the previous step*|
|Audience:|https://api.procurify.com/|
|Grant Type:|client_credentials|
Once you have the access token, you will need to cache it until it expires (24 hrs). Please let Procurify support know if you would like help with this.
An example request and response using cURL (replace client id and client secret)
$ curl -H "content-type: application/json" -X POST \
-d ''{"client_id": "~your_client_id~", \
"client_secret": "~your_client_secret~", \
"audience": "https://api.procurify.com/", \
"grant_type": "client_credentials"}'' \
https://.procurify.com/oauth/token
{"access_token": "~your-access-token~",
"scope": "urn:procurify-api:domain:~your_domain~ urn:procurify-api:email:~your_email~",
"expires_in": 86400,
"token_type": "Bearer"}
#### Use access token to access Procurify API resources.
Once you have the access token, you can make requests to Procurify API resources. You will need to set the following headers when making the request.
|Key|Value|
--- | ---
|Authorization:|Bearer *access_token from previous step*|
|X-Procurify-Client:|api|
An example request and response using cURL (replace access token and your procurify domain)
$ curl -H "Authorization: Bearer ~access_token~" \
-H "X-Procurify-Client: api" \
https://.procurify.com/api/v3/vendors/
{"data":[{"id":1,"name":"OTHER","active":true,"addressLineOne":"OTHER"...}'
parameters: []
tags:
- OAuth
security: []
requestBody:
content:
application/json:
schema:
type: object
properties:
client_id:
type: string
client_secret:
type: string
audience:
type: string
grant_type:
type: string
example:
client_id: ~your_client_id~
client_secret: ~your_client_secret~
audience: https://api.procurify.com/
grant_type: client_credentials
responses:
'200':
description: Successful authentication
content:
application/json:
schema:
type: object
properties:
access_token:
type: string
scope:
type: string
expires_in:
type: number
token_type:
type: string
enum:
- Bearer
example:
access_token: ~your-access-token~
scope: urn:procurify-api:domain:~your_domain~ urn:procurify-api:email:~your_email~
expires_in: 86400
token_type: Bearer
components:
securitySchemes:
BasicAuthentication:
type: http
scheme: basic
M2MAuthentication:
type: http
scheme: bearer
bearerFormat: JWT
RemoteAuthentication:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://<your-domain>.procurify.com/oauth/authorize
tokenUrl: https://<your-domain>.procurify.com/oauth/token
scopes: {}
cookieAuth:
type: apiKey
in: cookie
name: sessionid