Skip to main content

Post a partner

Endpoint Overview​

This API endpoint provides a detailed overview of the endpoint responsible for creating a partner record within the Juleb ERP.

Partner list:

  • Customer
  • Vendor
  • Employee

Endpoint Details​

  • Method: POST
  • URL: /api/v1/resources/partner/

Parameters​

  • Path Parameters: None
  • Query Parameters: None

Request body​

{
"name": "string"
}

Response​

  • 201 OK: The requested resource has been created.
  • 400 Bad Request: Bad request.
  • 401 Unauthorized: Unauthorized.

Response Body​

{
"data": {
id
}
}

Example​

Request​

const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;
axios.post(`https://${accountName}.juleb.com/api/v1/resources/partner`, {
name: "Ruba Ahmed"
}, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
2183
}