// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orderreturns.createorderreturn({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "lineItems": [],
// "operationId": "my_operationId",
// "orderId": "my_orderId",
// "returnMethodType": "my_returnMethodType"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "kind": "my_kind",
// "orderReturn": {}
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orderreturns.labels.create({
// Required. The merchant the Return Shipping Label belongs to.
merchantId: 'placeholder-value',
// Required. Provide the Google-generated merchant order return ID.
returnId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "carrier": "my_carrier",
// "labelUri": "my_labelUri",
// "trackingId": "my_trackingId"
// }
},
});
console.log(res.data);
// Example response
// {
// "carrier": "my_carrier",
// "labelUri": "my_labelUri",
// "trackingId": "my_trackingId"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orders.custombatch({
// Request body metadata
requestBody: {
// request body parameters
// {
// "entries": []
// }
},
});
console.log(res.data);
// Example response
// {
// "entries": [],
// "kind": "my_kind"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.datafeedstatuses.custombatch({
// Request body metadata
requestBody: {
// request body parameters
// {
// "entries": []
// }
},
});
console.log(res.data);
// Example response
// {
// "entries": [],
// "kind": "my_kind"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.accountstatuses.custombatch({
// Request body metadata
requestBody: {
// request body parameters
// {
// "entries": []
// }
},
});
console.log(res.data);
// Example response
// {
// "entries": [],
// "kind": "my_kind"
// }
}
main().catch(e => {
console.error(e);
throw e;
});