// 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.updateshipment({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The ID of the order.
orderId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "carrier": "my_carrier",
// "deliveryDate": "my_deliveryDate",
// "operationId": "my_operationId",
// "shipmentId": "my_shipmentId",
// "status": "my_status",
// "trackingId": "my_trackingId"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "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.orders.updatemerchantorderid({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The ID of the order.
orderId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "merchantOrderId": "my_merchantOrderId",
// "operationId": "my_operationId"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "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.orders.updatelineitemshippingdetails({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The ID of the order.
orderId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "deliverByDate": "my_deliverByDate",
// "lineItemId": "my_lineItemId",
// "operationId": "my_operationId",
// "productId": "my_productId",
// "shipByDate": "my_shipByDate"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "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.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.orders.updatelineitemshippingdetails({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The ID of the order.
orderId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "deliverByDate": "my_deliverByDate",
// "lineItemId": "my_lineItemId",
// "operationId": "my_operationId",
// "productId": "my_productId",
// "shipByDate": "my_shipByDate"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "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.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.orders.updatemerchantorderid({
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The ID of the order.
orderId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "merchantOrderId": "my_merchantOrderId",
// "operationId": "my_operationId"
// }
},
});
console.log(res.data);
// Example response
// {
// "executionStatus": "my_executionStatus",
// "kind": "my_kind"
// }
}
main().catch(e => {
console.error(e);
throw e;
});